Hixie
1263707b19
Fix baseline example (missed merge with Ian's new graphics APIs).
...
TBR=iansf
Review URL: https://codereview.chromium.org/1201383005 .
2015-06-24 11:33:54 -07:00
Hixie
dca45e1890
Expose baseline information in the Sky API.
...
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1208483002 .
2015-06-24 11:24:45 -07:00
Ian Fischer
1799eacef5
Decouple Canvas from DisplayList and map Picture and PictureRecorder more directly to their Skia counterparts.
...
Also changes the framework dart code to use the
refactored APIs and fixes the various examples and
tests.
R=abarth@chromium.org , ianh@chromium.org
Review URL: https://codereview.chromium.org/1190123003 .
2015-06-24 10:21:45 -07:00
Viktor Lidholt
c89c751937
Adds basic sprite sheet support to sprites
...
Adds drawImageRect to Canvas bindings
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1204783003 .
2015-06-23 16:38:28 -07:00
Matt Perry
30de689ef2
Resurrect painting.sky example as painting.dart.
...
I use it a lot to test and demo the painting API.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1188823008 .
2015-06-18 14:19:57 -04:00
Matt Perry
edff56d399
Add a Paint::toString() method to describe our Paint objects.
...
Add a test for RenderDecoratedBox sets up the Paint object correctly.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1185423003 .
2015-06-18 13:47:28 -04:00
Ian Fischer
2e42fc9181
Delete old raw .sky examples since they are no longer valid examples.
...
R=ianh@google.com , abarth@chromium.org
Review URL: https://codereview.chromium.org/1182993003 .
2015-06-18 10:34:38 -07:00
Adam Barth
d6cbdb4081
Fix data loading in the stocks app
...
We can't have two copies of |embedder.dart| or |shell.dart| because they take
ownership of some underlying Mojo handles. Instead of duplicating the code,
this CL makes the old locations just export all the symbols from the new
location. I've also done the same with fetch.dart to avoid code duplication.
Finally, I've removed image_cache.dart in the old location because the only
clients already live in the new world and ought to use the new location.
TBR=ianh@google.com
Review URL: https://codereview.chromium.org/1179923004 .
2015-06-18 09:14:51 -07:00
Adam Barth
0e493b017f
Implement ColorFilter in widgets/basic.dart
...
Also, trim the redundant |Mode| suffix from the TransferMode names.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1188003006 .
2015-06-17 17:06:27 -07:00
Hixie
350f16c93e
Rename UINode to Widget.
...
Also, move a widget example from examples/raw/ to examples/widgets/
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1190793002 .
2015-06-16 11:09:16 -07:00
Collin Jackson
fd396d024d
Simple support for routing in Sky
...
R=abarth@chromium.org , abarth, hixie
Review URL: https://codereview.chromium.org/1186273002 .
2015-06-16 09:47:57 -07:00
Adam Barth
ede4797da8
Add the ability for Sky content to trigger Android intents
...
We can use these intents to move the demo launcher to the new world.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1187583002 .
2015-06-12 13:43:01 -07:00
Adam Barth
2795216f6a
Wire up Android back button in SkyShell
...
The back button now triggers an event of type |back|.
R=eseidel@chromium.org , jackson@chromium.org
Review URL: https://codereview.chromium.org/1176373004 .
2015-06-11 14:33:01 -07:00
Matt Perry
502430f988
Fix bustage from my previous CL: "Color.fromARGB" becomes "new Color.fromARGB".
...
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1184523002 .
2015-06-11 15:59:10 -04:00
Matt Perry
583b126b57
Remove redundant Paint.setARGB in favor of assigning to Paint.color.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1182563002 .
2015-06-11 15:43:53 -04:00
Matt Perry
85670ba03d
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
c9dd71253c
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
b973810865
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
5dabb87cd7
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
232879f7dd
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
df5e4833d6
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
df472efd57
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
42892c733b
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
57df667f8f
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
9f64045470
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
aa80a91279
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
7a930b8352
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
ecb61e1466
Sky: Added radial gradients.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1169863002 .
2015-06-09 12:45:02 -04:00
Hixie
44ad012a65
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
d4ef9dcb26
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
5a14f03f7b
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
edd0d6e16a
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
2384779263
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
96aadc99b4
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
54d01bc005
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
6a0d1ffb2f
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
8afcb0fe2d
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
08b2a30e0f
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
8e34567652
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
16f8b21601
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
e16e10d830
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
8c097b0892
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
b18eecb50d
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
81b8512b41
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
485523560f
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
e8cafd9d71
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
e68fe5d33e
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
4f2d78a5bb
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
f396442e0a
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
2ff84ffe5f
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