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
Matt Perry
15687c8831
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
Hixie
270e386351
Fix compilation errors in render-sector.dart
...
TBR=abarth
Review URL: https://codereview.chromium.org/1153273002
2015-05-27 12:03:15 -07:00
Matt Perry
36baaf53a5
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
b1b94b4770
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
Hixie
d88b117bcf
[Effen] Point the stocks2 and components2 files at the forked libraries. (part II)
...
This was supposed to be in https://codereview.chromium.org/1153223003
TBR=abarth
Review URL: https://codereview.chromium.org/1160763003
2015-05-27 09:39:15 -07:00
Hixie
6ffea218fe
Replace setBoxDecoration() with a decoration property. (part II)
...
This was supposed to be in https://codereview.chromium.org/1153893006/
TBR=abarth
Review URL: https://codereview.chromium.org/1151383003
2015-05-27 09:35:15 -07:00
Hixie
2415a118f6
Replace setBoxDecoration() with a decoration property.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1153893006
2015-05-27 09:30:25 -07:00
Hixie
f706d82828
[Effen] Point the stocks2 and components2 files at the forked libraries.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1153223003
2015-05-27 09:13:37 -07:00
Hixie
24e81ea037
[Effen] Fork stocks and fn.dart so we have something to work on during the porting process
...
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1156543004
2015-05-26 12:53:08 -07:00
Hixie
c09aac3f3f
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
Collin Jackson
3976cd7b28
Clean up syntax as suggested by sethladd
...
R=sethladd@google.com , sethladd
Review URL: https://codereview.chromium.org/1159763003
2015-05-26 10:20:37 -07:00
Hixie
2470cdcafa
RenderSector example: add a class to stack in the other direction, and fix various bugs.
...
- the circle now fills the screen
- you can set dimensions on the solid color node
- debugging printfs and rects are gone
- the protocol is changed so that for sectors, you position before you size (since your size and your childrens' positions all depend on your own position)
TBR=abarth
Review URL: https://codereview.chromium.org/1154213003
2015-05-26 09:53:21 -07:00
Hixie
54403a610b
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
Collin Jackson
87e8b162c7
WIP Flexbox Layout Manager for Sky framework.
...
This only handles really basic cases and doesn't understand
justification, wrapping, and so on. Submitting for code
review so I can get some early feedback before I invest
more time into making it correct.
R=ianh@google.com , abarth
Review URL: https://codereview.chromium.org/1151293002
2015-05-22 18:47:29 -07:00
Adam Barth
51c670e62b
Address Ian's comments on layout2.dart
...
R=ianh@google.com
Review URL: https://codereview.chromium.org/1152603002
2015-05-21 13:32:21 -07:00
Adam Barth
af9a06c023
Port touch-demo.sky to SkyView universe
...
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1151613005
2015-05-21 12:34:38 -07:00
Adam Barth
ed38815dbd
Port spinning_square to SkyView universe
...
This demo shows how to create a spinning square using the lowest-level APIs. We
should probably create more spinning square demos at the other layers of the
system.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1147393002
2015-05-21 12:14:10 -07:00
Adam Barth
c63c396da8
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
Adam Barth
400d6df700
Actually perform a block layout
...
This CL teaches simple_render_tree how to do a block layout using layout2.dart.
R=eseidel@chromium.org , ianh@google.com
Review URL: https://codereview.chromium.org/1144423002
2015-05-21 11:15:50 -07:00
Adam Barth
3a6cab2c40
Add a simple_render_tree example
...
This example shows how to draw a circle using subclasses of RenderNode.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1144193004
2015-05-20 13:49:29 -07:00
Adam Barth
83805e2a9e
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
Hixie
9523283bb4
[Effen] Rename Action Bar to Tool Bar.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1133353008
2015-05-19 15:52:12 -07:00
Adam Barth
17040ff355
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
0b18d56d5a
Teach SkyView path to draw a circle
...
This CL adds a global view object that can receive a Picture and be signaled to
draw. When using SkyView, this Picture shows up on screen.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1134913003
2015-05-19 14:20:04 -07:00
John McCutchan
5fd9d77387
Fix domokit.github.io site deployment script
...
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1145843002
2015-05-19 14:03:13 -07:00
Adam Barth
a21939bdaf
Teach SkyView code path to print hello, world
...
This CL makes the SkyView codepath smart enough to print "hello, world" to the
console. The code path is off by default but can be enabled by changing one
line of code.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1131673011
2015-05-19 13:51:12 -07:00
Matt Perry
9dfbc4eea4
Sky: Add a CustomDart attribute to the IDL compiler, and use that with Canvas
...
to provide a better Dart API.
When the attribute is present on an IDL interface, the generate Dart code will be a private interface that can extended by custom dart code.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1135283005
2015-05-19 13:59:05 -04:00
John McCutchan
204298278a
Suppress unnamed library analyzer spam in shelldb
...
Revert "Add library names to many sky libraries"
This reverts commit 1337e0a803a54ee92d6dce7f8c4a6335f7cbb9fa.
BUG=
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1142893007
2015-05-19 10:25:43 -07:00
John McCutchan
5d3bfd6108
Add library names to many sky libraries
...
- Analyzer complains about libraries not having names. This adds names to many libraries.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1150433002
2015-05-19 10:19:11 -07:00
Eric Seidel
293563078d
Add Canvas.drawPicture
...
I wrote another copy of paint_element_into_displaylist
using this new technology.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1129353010
2015-05-18 15:13:15 -07:00
Eric Seidel
20459183e4
Make it possible to Paint elements into a display list.
...
Currently said elements need to be in the DOM and have
already been laid out for this to work, but follow-up patches
will remove these restrictions.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1144673002
2015-05-18 14:49:59 -07:00