Collin Jackson
45cbbc0fae
Implement radio button for Sky’s fn2
...
R=abarth@chromium.org , eseidel@chromium.org , abarth
Review URL: https://codereview.chromium.org/1157573012
2015-06-04 17:24:38 -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
Viktor Lidholt
2d8240aa75
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
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
Eric Seidel
8d52fb51dc
Make Icon work using space-aged base-url technology.
...
I also moved Icon back to using int, since double doesn't
actually make sense for an icon pixel size.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1164023005
2015-06-03 17:16:12 -07:00
Adam Barth
1e9184d282
Make Uri.base work in SkyView
...
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1153673005
2015-06-03 17:00:44 -07:00
Adam Barth
6d5227ea0c
Make Drawer in components2 work
...
This CL introduces RenderStack and fixes a number of bugs to make the Drawer in
components2 work.
R=ianh@google.com , eseidel@chromium.org
Review URL: https://codereview.chromium.org/1147143005
2015-06-03 14:52:13 -07:00
Hixie
57fef366d1
Provide Point+Size, Point-Point, Point.toSize(), and Rect.toPoint().
...
Also some minor code cleanup in affected files and nearby files.
R=mpcomplete@chromium.org
Review URL: https://codereview.chromium.org/1160453006
2015-06-03 14:21:46 -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
Matt Perry
3aa1e23d7d
Sky: Convert TransferMode to an enum.
...
It looked and smelled like an enum, so lets just make it one. This also gives us a nice toString() method.
R=abarth@chromium.org , eseidel@chromium.org , ianh@google.com
Review URL: https://codereview.chromium.org/1144233004
2015-06-03 16:19:14 -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
Matt Perry
72ca1d9f32
Simplify TransferMode and Color types.
...
They are no longer wrappers in C++, but are converted directly to their Skia types.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1162393002
2015-06-03 13:33:33 -04:00
John McCutchan
87fd276d3d
Enable Dart's checked mode in the Sky controller by default for debug builds
...
This matches the behaviour of the Mojo Dart controller and was requested by tonyg@
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1152873006
2015-06-03 09:33:17 -07:00
Eric Seidel
d9ed864cc9
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
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
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
Collin Jackson
4a8133b96a
Fix generated code for callbacks where argument interface doesn't match implementation class name
...
R=mpcomplete@chromium.org , mpcomplete
Review URL: https://codereview.chromium.org/1163863002
2015-06-01 15:33:25 -07:00
Matt Perry
ffed692545
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
326e2324c9
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
5afac54a8b
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
Matt Perry
fb8596730c
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
9a73fe989e
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
bf94f5c027
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
Matt Perry
eaba0b981f
Add DartHandleCache and use it to cache strings used when converting Rect and
...
Point classes.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1145103005
2015-05-28 13:39:33 -04:00
Matt Perry
4ee1848817
Add operator==, hashCode, and toString for Rect, Point, and Size dart classes.
...
R=abarth@chromium.org , sethladd@google.com
Review URL: https://codereview.chromium.org/1154213005
2015-05-28 13:33:05 -04:00
Eric Seidel
3046acd9eb
Remove backface visibility
...
I made one edit in FrameView while looking at writing
RenderParagraph in Dart and then decided to look for
a slightly larger clean-up to justify committing it.
I found backface-visibility which I removed.
backface-visibility controls painting/hittesting of flipped objects.
https://developer.mozilla.org/en-US/docs/Web/CSS/backface-visibility
It's mostly used as a hack to get layers however. :)
TBR=abarth@chromium.org
Review URL: https://codereview.chromium.org/1161623004
2015-05-28 10:18:24 -07:00
Adam Barth
ae7e807f61
Flesh out Rect/Point/Size classes in dart:sky
...
R=mpcomplete@chromium.org
Review URL: https://codereview.chromium.org/1152213003
2015-05-28 09:42:17 -07:00
John McCutchan
f0c5ab0b82
Roll Dart forward
...
BUG=
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1159443002
2015-05-28 07:45:06 -07:00
Matt Perry
1a07d29d7e
Sky: Add a DrawLooper interface to the painting API to be used for shadows.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1144193006
2015-05-27 16:22:01 -04:00
Adam Barth
f179203848
Add support for testing content in SkyView
...
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1160763004
2015-05-27 13:14:08 -07:00
Matt Perry
4139325e2c
Sky: Add a Point class.
...
Also, fix the style in Rect.cpp/.h.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1158843002
2015-05-27 14:40:02 -04:00
Eric Seidel
922ea790b8
Make it possible to draw Text in the new window/document-less world
...
I had to add back document.createText() since new Text()
does not work in the new world yet.
LayoutRoot is a new Dart-exposed class which holds the Frame and
all associated machinery, sufficient to trigger a restyle
and layout of the subtree.
This is all kinda hacky and I'm sure likely to cause many
crashes if folks call random methods on these disconnected
trees.
But this makes it at least possible to paint text for now
and we can improve this in the coming days.
This really should have Adam's review. It's hugely hacky
but I'd like to negotiate out with him the timeline on
which we should fix some of these hacks.
R=ianh@google.com
TBR=abarth@chromium.org
Review URL: https://codereview.chromium.org/1148253003
2015-05-27 11:05:42 -07:00
Eric Seidel
2f3c23ed01
Fix dart:sky.internals to work in SkyView
...
R=ianh@google.com
TBR=abarth@chromium.org
Review URL: https://codereview.chromium.org/1156203003
2015-05-26 16:01:25 -07:00
Hixie
b96da3b2ad
Rationalise hit testing in the new RenderNode world
...
- makes the event logic not involve a boolean return value (since we ignored it anyway)
- splits the event handling logic into two steps, hit testing and event dispatch
- introduces an App class on the Dart side to factor out the interaction with the C++ side
- ports sector-layout and simple_render_tree to the new App infrastructure
- port simple_render_tree to the new event handling logic
- implement hit testing for the sector-layout demo
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1143343004
2015-05-26 12:44:35 -07:00
Hixie
2f510d9f8c
A proof of concept for annular sector layout.
...
Could be useful for watch faces. :-)
Includes some minor fixes to layout2.dart.
Includes adding a very basic path API.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1152383002
2015-05-26 08:33:13 -07:00
Eric Seidel
8aa3caf350
Make SkyView vs. WebView controlable via url path
...
We're currently in a transition between using main.sky and main.dart
files as our main() entry point for Sky applications.
This CL makes this runtime controlable by path name. If it finds
a .dart in the path name it will use SkyView, otherwise it will
fall back to the existing WebView codepath.
SkyView does not expose a window object and much of the existing
Sky Engine is not initialized when main() is run. Clients should
be transitioning away from main.sky towards main.dart in the near
future, however main.dart is probably not ready for general
consumption at this point.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1152313002
2015-05-22 12:59:21 -07:00
Collin Jackson
1408fcff9a
Don't start the Observatory when testing Sky viewer
2015-05-21 21:03:34 -07:00
Collin Jackson
4c6f6cd8a8
Hard code the port to 8181
2015-05-21 21:03:33 -07:00
Eric Seidel
827e621238
Teach sky_viewer about the new main.dart hotness
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1147413003
2015-05-21 12:46:36 -07:00
Adam Barth
b7c3f545f0
Make hit testing work in layout2.dart
...
This CL makes simple_render_tree.dart interactive by making the hit testing
system work. I've also added a mechanism for requesting an animation frame.
R=eseidel@chromium.org , ianh@google.com
Review URL: https://codereview.chromium.org/1153543002
2015-05-21 11:22:17 -07:00
John McCutchan
7367e532b4
Move 'dart:mojo.internal' into sdk_ext directory of mojo package
...
BUG=
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1143073004
2015-05-21 11:02:43 -07:00
Matt Perry
4c5aee62cd
Sky: different tack for custom Rect type in the Canvas API.
...
Rect is now a dart-only type, defined in its own .dart file. I use
DartConverter when passing a Rect into C++. I also special-cased Rect in the
IDL compiler so that it's passed by value, instead of allocating a new
Rect object on the heap.
This also adds a mechanism to add custom .dart files to dart_sky.dart - used by
Rect.dart.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1151673002
2015-05-20 17:58:38 -04:00
Adam Barth
67109ce3e1
Plumb input events into SkyView
...
Clients can now register a callback that gets called whenever we have an event
for the view. We'll need to update the Event class at some point, but this is a
start.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1129333005
2015-05-19 16:50:28 -07:00
Adam Barth
3acb930b0a
Attempt to fix bad dependency in Sky build
...
Several people have run into trouble building Sky because of a missing
dependency in the build. From inspection, it looks like this might fix the
issue, but it's hard to be sure without being able to reproduce the issue
locally.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1130353013
2015-05-19 15:44:36 -07:00
Adam Barth
0906da7f0f
Plumb display metrics into SkyView
...
This CL teaches SkyView the width, height, and device pixel ratio of the
display. In the future, we'll want some sort of notification system for when
these values change.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1139823010
2015-05-19 14:54:08 -07:00
Adam Barth
aec042c97d
Fix build
...
TBR=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1138443005
2015-05-19 14:32:57 -07:00