3924 Commits

Author SHA1 Message Date
Eric Seidel
7ebb281c5c Fix examples/game to work after Hixie's grand rename.
TBR=viktorl@google.com

Review URL: https://codereview.chromium.org/1158273009
2015-06-04 15:25:46 -07:00
Eric Seidel
8a0caf8ed4 Start making input work
Does not work yet.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1163973005
2015-06-04 15:18:09 -07:00
Adam Barth
b76af41f63 Prepare StockList for use in stocks2
This CL does a bunch of ground work for getting StockList ready for use in
stocks2. It's still not quite working because of an interaction with Scaffold
that we don't fully understand.

R=eseidel@chromium.org, ianh@google.com

Review URL: https://codereview.chromium.org/1148793005
2015-06-04 15:10:09 -07:00
Eric Seidel
b05d618e62 Attempt to write a RenderShadowedBox
The goal of this is to have a Renderer-layer abstraction
around the Sky Engine c++ apis for drawing a shadow.

R=mpcomplete@chromium.org

Review URL: https://codereview.chromium.org/1146893004
2015-06-04 14:49:24 -07:00
Collin Jackson
f66a933a55 Implement menu_divider
R=abarth@chromium.org, abarth

Review URL: https://codereview.chromium.org/1163913004
2015-06-04 13:11:40 -07:00
Hixie
68369e9d62 Style guide says enum values should be lowerCamelCase.
https://www.dartlang.org/articles/style-guide/#names

R=jackson@google.com

Review URL: https://codereview.chromium.org/1158813004
2015-06-04 12:24:10 -07:00
Viktor Lidholt
3b06e1e1f7 Adds support for transfer mode in Paint and SpriteNode classes. Adds support for opacity in sprites, and modifies example game.
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1164633004
2015-06-04 11:14:07 -07:00
Collin Jackson
bcf65bd04c Stub out InkWell and implement Sky’s fn2 menu item
R=abarth@chromium.org, ianh@google.com, abarth, hixie

Review URL: https://codereview.chromium.org/1165983002
2015-06-04 11:04:01 -07:00
Matt Perry
30dac5853d Canvas.concat takes a 16-element Float32List instead of an array.
The array should be in column-major format, in the format used by vector_math.dart.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1155193004
2015-06-04 13:51:44 -04:00
Hixie
433df32cd0 Enable RenderDecoratedBox to draw borders.
Currently supports only solid borders, but of any colour and size, independently controlling each side.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1154903006
2015-06-04 10:50:59 -07:00
Adam Barth
9bdb39d0ec Fix build after hixie's rename
TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1164073002
2015-06-04 10:49:05 -07:00
Hixie
395102d5ca Rename RenderNode to RenderObject.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1165013003
2015-06-04 10:45:21 -07:00
Adam Barth
e99c880bc2 Fix gesture events in fn2
This CL makes gesture events work again in fn2.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1146923005
2015-06-03 16:06:15 -07:00
Hixie
d268da7ad5 Plug the drawer into stock2.
Not tested on device.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1160523005
2015-06-03 15:36:48 -07:00
Eric Seidel
7f705336e8 Fork theme to theme2 and use sky.Color types directly.
This also works around an Android-only crasher for the Dart VM:
https://github.com/domokit/mojo/issues/192

R=ianh@google.com

Review URL: https://codereview.chromium.org/1157243012
2015-06-03 15:22:08 -07:00
Collin Jackson
fef65fc431 Implement RenderImage and Image for Sky
This also fixes a bug that was preventing markNeedsLayout from working

R=abarth@chromium.org, eseidel@chromium.org, abarth, eseidel

Review URL: https://codereview.chromium.org/1160013004
2015-06-03 15:17:12 -07:00
Viktor Lidholt
006da931cf Sky example game enhancements, adds preloading of images and adds transform modes to SpriteBox
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1149183004
2015-06-03 15:05:55 -07:00
Hixie
686123e117 Add overlays back to stocks2.
Except that nothing actually uses these now so it's a no-op really.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1157243011
2015-06-03 15:03:34 -07:00
Hixie
3783ad3717 Fix scaffold to work for the toolbar.
Also, make the scaffold code more generic (with slots in a map,
instead of dedicated members for each slot).

This may eventually benefit from being split into a general
"multislot" superclass and a scaffold-specific subclass, but for now
it'll do.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1152163007
2015-06-03 14:50:32 -07:00
Matt Perry
dc4915059f Update BoxDecoration and RenderParagraph to use sky.Color instead of int.
Also add operator==, hashCode, toString, and some basic Color constants to
Color.

R=abarth@chromium.org, ianh@google.com

Review URL: https://codereview.chromium.org/1162023004
2015-06-03 16:57:04 -04:00
Eric Seidel
28a43627a2 Make tracing work in the new .dart world.
R=abarth@chromium.org, viktorl@google.com

Review URL: https://codereview.chromium.org/1152483006
2015-06-03 12:40:38 -07:00
Adam Barth
6543b55cb6 Add support for transforms to container
These transforms are currently very basic but they seem to mostly work.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1152273004
2015-06-03 10:20:33 -07:00
Eric Seidel
c47a82d5ca Give the Stocks2 App a new improved toolbar.
Looks horrible.  But it's a start.

R=abarth@chromium.org, ianh@google.com
BUG=

Review URL: https://codereview.chromium.org/1146913005
2015-06-02 16:13:31 -07:00
Viktor Lidholt
3118a6fba1 Initial version of working game with Box2D, images, nodes and sprites.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1161023006
2015-06-02 15:09:01 -07:00
Adam Barth
81cc63edfe Implement Container in fn2
This CL is a first pass at implementing container in fn2. In this approach,
Container is a Component that builds a number of RenderNodeWrappers depending
on what is needed.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1158983005
2015-06-02 15:07:02 -07:00
Matt Perry
0f8ae9f16c Add a MaskFilter interface to dart:sky to handle blur.
For this, I added back my previous CustomDart attribute for customizing the
generated Dart code of an interface.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1162843003
2015-06-02 17:26:32 -04:00
Hixie
b53644f660 Rename rendering/render_*.dart to rendering/*.dart
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1166773003
2015-06-02 13:55:20 -07:00
Adam Barth
11d50579a1 Add BlockContainer to fn2
BlockContainer uses a RenderBlock to lay out its children.

R=eseidel@chromium.org, jackson@chromium.org

Review URL: https://codereview.chromium.org/1166473005
2015-06-02 12:19:25 -07:00
Adam Barth
e0fc6df9a3 Mark fn2's EventListenerNode work for PointerEvent
Prevously we listened for events on the document and then walked up the
component hierarchy looking for EventListenerNodes. Now we do something similar
by hooking the event dispatching logic in the AppView.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1153343004
2015-06-02 12:18:13 -07:00
Matt Perry
9618a82750 Add TransferMode to dart:sky, and use it instead of passing ints around.
Also use Point in place of passing 2 ints to the DrawLooper API.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1158883004
2015-06-02 15:03:44 -04:00
Matt Perry
e28c832a79 Re-land "Add a Color class to dart:sky."
The previous patch broke the sky tests. I have updated the framework to use the new Color class.

R=jackson@google.com

Review URL: https://codereview.chromium.org/1159663003
2015-06-02 14:09:42 -04:00
Collin Jackson
dc9635dd33 Implement a simple image cache for Sky in Dart. This doesn't yet do any eviction from the cache.
R=abarth@chromium.org, abarth

Review URL: https://codereview.chromium.org/1165753004
2015-06-02 10:44:48 -07:00
Collin Jackson
2fe4b05e6d Refactor image handling in Sky to expose the loader and image as separate classes to Dart code. This makes it possible to avoid unnecessary paints, by only painting once when the image has loaded. Now that we've separated the loader and image classes, we can implement an image cache in Dart.
R=abarth@chromium.org, abarth

Review URL: https://codereview.chromium.org/1156003007
2015-06-01 16:21:21 -07:00
Matt Perry
4eb2ac712e Revert "Add a Color class to dart:sky."
This reverts commit a413c8319fe9a46dc131f6efe275d014c9cb7eb9.

Reason: seems to have broken Sky tests:
Regressions: Unexpected crashes (2)
  raw/render_box.dart [ Crash ]
  raw/render_flex.dart [ Crash ]

TBR=jackson@google.com

Review URL: https://codereview.chromium.org/1143133007
2015-06-01 18:13:35 -04:00
Matt Perry
e22b790e0c Add a Color class to dart:sky.
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1161273004
2015-06-01 16:48:48 -04:00
Collin Jackson
205bd1449a Add Sky framework support for drawing images
R=abarth@chromium.org, abarth

Review URL: https://codereview.chromium.org/1151753009
2015-05-29 16:45:43 -07:00
Adam Barth
04169c4ce3 Add a simple inksplash example
We'll eventually turn this into a full fn2 component, but for now it's just an
example.

To make this work, I created a schedule.dart as a start to implementing
scheduler.md. For now, I've kept the API similar to the web platform so that
the old world can continue use it backed by sky.window.requestAnimationFrame.

R=eseidel@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1145973009
2015-05-29 13:55:12 -07:00
Adam Barth
dbbe62ea8f Split layout2.dart into several files
Previously layout2.dart was a thousand lines long.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1161003002
2015-05-28 16:42:04 -07:00
Hixie
46e47cf011 Make RenderParagraph mutable, and make it fit the new RenderNode protocols
R=abarth@chromium.org, eseidel@chromium.org

Review URL: https://codereview.chromium.org/1165463002
2015-05-28 15:19:36 -07:00
Adam Barth
3f22019e66 Replace BoxDimensions with sky.Size
R=ianh@google.com

Review URL: https://codereview.chromium.org/1150253005
2015-05-28 14:29:29 -07:00
Adam Barth
b0e39b7d99 Move simple_render_tree into tests as render_flex
R=ianh@google.com

Review URL: https://codereview.chromium.org/1146123003
2015-05-28 14:29:10 -07:00
Matt Perry
96b04e34b1 Add an API to set the ColorFilter on a Paint object.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1158693005
2015-05-28 17:17:11 -04:00
Eric Seidel
db50ce1659 Add hello_fn2.dart and make Text("Hello fn2") actually render something.
R=ianh@google.com

Review URL: https://codereview.chromium.org/1160843005
2015-05-28 13:56:36 -07:00
Adam Barth
10901fabad Introduce RenderProxyBox and RenderSizedBox
Also makes Point, Size, and Rect immutable.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1162033002
2015-05-28 13:39:26 -07:00
Adam Barth
647232b8a5 Use Point, Size, and Rect in layout2.dart
R=ianh@google.com

Review URL: https://codereview.chromium.org/1156303004
2015-05-28 12:42:54 -07:00
Eric Seidel
081a440e6c Move RenderParagraph into layout2.dart
TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1155103003
2015-05-28 12:26:09 -07:00
Eric Seidel
54eb9b146e Add a very simple RenderParagraph example using LayoutRoot.
I'm sure we'll want something more sophisticated in the near future.

Next step is to actually animate this updating layout.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1150183005
2015-05-28 12:18:56 -07:00
Hixie
ec29082f84 Refactor layout/relayout into a single method.
This dramatically simplifies the layout model.
I haven't gone through and simplified the existing functions, we should probably go through and figure out if they can be cleaned up a bit.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1161983004
2015-05-28 11:15:58 -07:00
Hixie
e45a3f7b32 Refactor padding out of RenderBlock.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1143153011
2015-05-27 17:11:45 -07:00
Hixie
ac0d5e31a6 [Effen] port fn and stock to RenderNode, part 1 of many
This gets things off the ground barely enough to show some pixels.
These are not pixels that are actually part of the stock app, but
it's a start.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1157033006
2015-05-27 13:36:01 -07:00