Matt Perry
f8b4af944c
Expose and use constants for DrawLooperLayerInfo.setPaintBits to dart.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1175403002 .
2015-06-11 15:41:12 -04:00
Matt Perry
a523d7f3ea
Fix up constructor naming style for MaskFilter and ColorFilter.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1179913002 .
2015-06-11 13:15:20 -04:00
Matt Perry
6ed8fb863c
Sky: Small fixes to Gradient interface. Added comments and renamed constructors.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1180873003 .
2015-06-11 13:14:51 -04:00
Hixie
6a8dd7d284
Separate out the raw (directly manipulating sky.view) examples from the rendering (using RenderObject et al) examples.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1173233002
2015-06-10 16:23:43 -07:00
Hixie
ee42b94fa2
Move spinning_arabic.dart to the raw/ examples directory for consistency with the others.
...
R=eseidel@chromium.org , eseidel
Review URL: https://codereview.chromium.org/1180623003
2015-06-10 16:07:12 -07:00
Hixie
58efa250e5
Replace some 'as' operators with equivalent code that doesn't do any checks in production mode.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1181453003
2015-06-10 15:00:34 -07:00
Adam Barth
ac7f2ff860
Ink splashes should start at the touch point
...
Previously, they always started at the center of the RenderInkWell. Now we
remember the local coordinates we computed during the hit test and provide that
information when handling the event.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1180553002 .
2015-06-10 13:55:20 -07:00
Matt Perry
fe153f179a
Add LinearBoxGradient and RadialBoxGradient decorations for RenderDecoratedBox.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1175763002 .
2015-06-10 12:23:57 -04:00
Adam Barth
0e5bb2d231
Add a basic InkWell implementation
...
This CL replaces the (non-working) components2 InkWell with some code based on
the ink_well example. There are at least two issues with the implementation:
1) The ink splash always starts at the center of the well because we don't have
a facility for converting from global to local coordinates, which means we
can't tell where the tap occurred in the local coordinates we need to use
for painting.
2) When used inside a MenuItem, the in splash disappears shortly after
starting, presumably because the button starts highlighting, which causes a
component rebuild and somehow we lose the RenderInkWell instance.
I plan to address these issues in subsequent CLs.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1172033003 .
2015-06-10 09:04:15 -07:00
Matt Perry
ba6a9a2ba5
Sky: Allow clients to specify tile mode for gradients (repeating or mirror).
...
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1166223004 .
2015-06-09 15:21:46 -04:00
Matt Perry
5a0b18490f
Change the ColorFilter constructor to ColorFilter.Mode, in case we want to add
...
more ColorFilter types.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1163373007 .
2015-06-09 14:55:52 -04:00
Adam Barth
44a0af042c
Add a proper material shadow the popup menu
...
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1172723002 .
2015-06-09 10:31:39 -07:00
Matt Perry
71cf849271
Sky: Added radial gradients.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1169863002 .
2015-06-09 12:45:02 -04:00
Hixie
37f0b0240b
Convert everything in the Sky API from degrees to radians.
...
Radians are the one true angle unit.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1164393002
2015-06-08 14:38:06 -07:00
Collin Jackson
62bff5f7ef
Sky support for flexbox justify content
...
R=abarth@chromium.org , abarth
Review URL: https://codereview.chromium.org/1164363002
2015-06-08 14:14:02 -07:00
Adam Barth
824bc31626
Add Point.origin for new Point(0.0, 0.0)
...
R=eseidel@chromium.org , ianh@google.com
Review URL: https://codereview.chromium.org/1166183002
2015-06-08 13:36:52 -07:00
Matt Perry
1f26d65757
Add support for linear gradients, implemented as skia shaders.
...
I had to complicate the IDL bindings generation to allow passing an array of
colors. Without these changes, we'd try to convert the dart object to
Vector<SkColor>, which C++ thinks is Vector<unsigned>, and we'd use the wrong
converter. So I added some template grease to force it to use a
Vector<CanvasColor> converter.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1152963009
2015-06-08 13:49:10 -04:00
Adam Barth
1526e5f8e0
Introduce sky.Sky.zero
...
And deploy it in a few places.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1164303002
2015-06-08 10:09:03 -07:00
Hixie
b7c588661c
Rename "BorderSide.None" to "BorderSide.none", since it's a constant, and change the sky.Size.infinite() constructor to a constant.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1158263005
2015-06-04 16:17:20 -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
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
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
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
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
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
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
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
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