117 Commits

Author SHA1 Message Date
Adam Barth
55772e1efb Add missing file 2015-10-09 23:08:17 -07:00
Adam Barth
72c103cefa Rename dart:sky to dart:ui 2015-10-09 19:27:13 -07:00
Jason Simmons
64d1eb9611 Merge pull request #1542 from jason-simmons/unit_test_syntax_error2
Check if invocation of a closure failed due to a compilation error
2015-10-09 16:33:28 -07:00
Adam Barth
06eaaf7909 Fix build
Mistakenly broke sky_viewer.mojo.
2015-10-09 09:19:21 -07:00
Adam Barth
1888eacb75 Drain data pipe for images no a background thread
Instead of joining the UI thread to copy data from the network into a buffer,
we now drain the data pipe for image decoding on a background thread.
2015-10-09 07:25:54 -07:00
Adam Barth
1946924b16 Introduce IO thread for background tasks
Currently we run some tasks on the UI thread that shouldn't block the frame,
such as decoding images. This patch introduces a background thread on which we
can run these tasks.
2015-10-09 06:37:57 -07:00
Adam Barth
597b19fe05 Add an isEmpty property to Rect
Also trace image decoding.
2015-10-08 14:58:17 -07:00
Jason Simmons
fbc0a696dd Check if invocation of a closure failed due to a compilation error
This is a fix for bug #1325.  The test framework is running the test code
as a microtask using DartInvokeAppClosure.  If the test causes a compilation
error, the test framework Dart code can not catch it.  The invocation in
sky_shell will return a compilation error handle.  The sky_shell process
will not shut down, and the test framework will hang.

This change will cause sky_shell to shut down on a compilation error in
the test microtask.
2015-10-08 10:48:55 -07:00
Adam Barth
1151cfb75c Merge pull request #1512 from abarth/no_stacks
Don't dump stacks when app fails to start
2015-10-08 10:00:35 -07:00
John McCutchan
abf922cb44 Roll Dart runtime forward to c9334ed61f11df2d9aecc6311a5981eba0e55c01 2015-10-07 13:52:51 -07:00
Chinmay Garde
b95b5292b8 Setup infrastructure to capture SKP traces when the frame interval exceeds certain thresholds 2015-10-06 17:03:10 -07:00
Adam Barth
5aa983d5a7 Don't dump stacks when app fails to start
Instead of producing a C++ stack dump when the Dart app fails to start, we just
exit with an error code.
2015-10-06 15:47:23 -07:00
Adam Barth
55481ed387 Merge pull request #1444 from abarth/float64
Moves from vector_math to vector_math_64
2015-10-01 15:37:20 -07:00
Hixie
3e0c6d586e EdgeDims changes and other fixes to core classes.
- Rename EdgeDims constructor to EdgeDims.TRBL().

- Add operator== to Size and Offset so that you can compare Size to
  DebugSize in checked mode.

- Add Size.lerp().

- Add various operators to EdgeDims. (*, /, ~/, %)

- Add EdgeDims.lerp().

- Update style guide. I went there to fix an EdgeDims constructor
  example, and stayed because some recent things came up and I wanted to
  add them before I forgot.
2015-10-01 15:34:04 -07:00
Adam Barth
8cf43b65d2 Moves from vector_math to vector_math_64
* Moves from vector_math to vector_math_64
* Adds support for Float64List in Dart bindings
2015-10-01 14:46:13 -07:00
Collin Jackson
ef32f71b80 Merge pull request #1434 from collinjackson/decode_lists
Support for decoding images in lists
2015-10-01 13:24:08 -07:00
Collin Jackson
9f7e7c5a3c Use PrivateDart for ImageDecoder constructors 2015-10-01 13:16:30 -07:00
Chinmay Garde
fef54063ce Merge pull request #1420 from johnmccutchan/roll_dart
Roll the Dart runtime forward
2015-10-01 11:14:55 -07:00
Collin Jackson
3943fa1da4 Support for decoding images in lists 2015-10-01 11:06:11 -07:00
John McCutchan
2f453bb582 Roll the Dart runtime forward 2015-09-30 15:22:04 -07:00
Matt Perry
3266b147cf Implement working UpdateTask in Dart
Dart code now supports the full flow that the C++ code used to: version check,
download, replace app bundle. Bonus: the Dart code is much easier to follow,
thanks to async/await!

This is part 2 of a 3-part change. The first part added new mojom
interfaces, PathService and UpdateService, to the sky_services package.
2015-09-30 18:13:11 -04:00
Chinmay Garde
bfb9855c24 Since the statistics scene is not a container layer, rename the API in SceneBuilder 2015-09-28 12:40:19 -07:00
Chinmay Garde
ab927e23e7 Allow displaying compositor statistics from Dart 2015-09-28 12:20:28 -07:00
James Robinson
9423be0de5 Flush stdout after printing messages from Dart
This modifies the Logger_PrintString used to implement Dart's print() to
explicitly fflush stdout after writing. In some contexts stdout may not be line
buffered, such as when launching a process that runs sky using dart:io's
Process.start.
2015-09-24 15:59:37 -07:00
Jeff Brown
e7483b60a4 Remove unused dependency on ui::GestureRecognizer. 2015-09-24 14:00:04 -07:00
Matt Perry
81b2b81b1d Replace C++ UpdateTask with an empty dart version, loaded as a snapshot.
This adds a new placeholder dart package updater in sky/packages. This is built
into a snapshot and compiled into the Sky engine binary using the same
mechanism as the Dart isolate.

I also added a SkyHeadless class, similar to SkyView, used for running Dart
code without a view.
2015-09-23 14:09:38 -04:00
Adam Barth
ffb27159d7 Remove GestureEvent.idl
This interface no longer has any clients.
2015-09-21 17:14:04 -07:00
Kris Giesing
4664966094 Fix Rect intersection; add test 2015-09-18 15:22:59 -07:00
Adam Barth
dcaef43b97 Fix text rendering
Now that RenderView doesn't look at FrameView for its size, we need to set the
size on the RenderView directly.
2015-09-17 11:28:43 -07:00
Adam Barth
77264d3e94 Teach sky.Paragraph how to actually compute layout
Previously layout was exiting early because the frame view
was null. Now we actually compute some layout and paint the
text. This patch makes paragraph_builder_test pass.
2015-09-17 09:37:30 -07:00
Adam Barth
9a2411eeac Crash when we can't run main()
Also, in testing, crash when we can't load a library off disk.
2015-09-16 16:42:37 -07:00
Adam Barth
d5b2969546 Simplify TestRunner now that we don't have test_sky 2015-09-16 11:00:33 -07:00
Adam Barth
437cedf45e Disentangle FontSize from Settings
Instead, just store the default font sizes in statics. These statics are
constants for now, but we'll probably make them configurable at some point.
2015-09-11 12:51:27 -07:00
Adam Barth
cafcbbae1e Merge pull request #1133 from abarth/paragraph_builder
ParagraphBuilder should be able to build a paragraph
2015-09-11 10:59:02 -07:00
Adam Barth
29ab28d922 ParagraphBuilder should be able to build a paragraph
This patch start down the road of implementing text layout and painting without
the DOM. We can construct a basic paragraph consisting of a single run of text
and we can get through layout without crashing.
2015-09-11 10:23:15 -07:00
Hans Muller
1ed23ea92f Finish converting Dismissable from Listener to GestureDetector
Dismissable now only depends on GestureDetector.

Added a unit test that verifies that issue #1068 has been fixed. It's commented out for now.

Cleaned up VelocityTracker.cc et al a little.
2015-09-11 09:37:55 -07:00
Hans Muller
d18c0f7758 Initial support for the fling gesture detector
Added FlingGestureRecognizer and exposed it in the GestureDetector class. FlingGestureRecognizer is based on the Android/Chromium VelocityTracker class which computes a velocity vector for for a list of X,Y,Time tuples.

The Scrollable classes now use the FlingGestureRecognizer. Dismissable and Drawer still need to be updated
2015-09-09 16:49:31 -07:00
Chinmay Garde
b44a86c08a PictureLayers cache the contents of their pictures if the pictures
dont mutate from frame to frame
2015-09-09 09:54:30 -07:00
Viktor Lidholt
dc1b773ed1 Cleans up naming and adds documentation to drawVertices bindings 2015-09-08 12:04:03 -07:00
Viktor Lidholt
1d6cd4bc01 Adds bindings to Skia for VertexMode and drawVertices 2015-09-08 11:09:45 -07:00
Viktor Lidholt
baabf090f0 Adds bindings for ImageShader to SkShader::CreateBitmapShader 2015-09-04 16:03:14 -07:00
Chinmay Garde
2c180b3b8b Merge pull request #1049 from abarth/layer_tree_to_gpu
Pass the sky::LayerTree to the GPU thread for drawing
2015-09-04 12:55:20 -07:00
Adam Barth
58d67facd8 Merge pull request #1011 from abarth/paragraph_builder
Sketch a DOM-free API for laying out and painting text
2015-09-03 20:29:15 -07:00
Adam Barth
e5d7e69346 Pass the sky::LayerTree to the GPU thread for drawing
Instead of squashing the layers down into a single SkPicture, we now pass the
tree to the GPU thread, which draws everything separately.
2015-09-03 19:20:32 -07:00
Hans Muller
06b420433f Fix minor problems in _ScrollGestureRecognizer, Dismissable
Alternating scroll gestures would sometimes be ignored because _ScrollGestureRecognizer didn't always reset its _state when the pointer[s] went up.

A Dismissable dismiss triggered by a drag and then a fling could cause the next attempt to drag-dimiss to fail.

Fixed the definition of lerpColor().
2015-09-03 13:40:35 -07:00
Adam Barth
bc8f7a096e SceneBuilder should build a tree of layers
We now build a layer tree before squashing the draw command down to an
SkPicture.
2015-09-02 18:23:01 -07:00
Adam Barth
a17c01874d Remove dead code
These files were breaking clean builds.
2015-09-02 12:32:57 -07:00
Adam Barth
5551c6ee35 Merge pull request #1010 from abarth/clean_idls
Remove some unused dart:sky IDLs
2015-09-02 10:54:50 -07:00
Adam Barth
ed655b8973 Merge pull request #1009 from abarth/improve_paint
Improve the Paint API in dart:sky
2015-09-02 10:54:41 -07:00
Adam Barth
68b06c8736 Sketch a DOM-free API for laying out and painting text
Rather than using the DOM to upload text and styling information into the
engine, this patch begins sketching a more direct API that bypasses the DOM and
CSS. Currently, this API doesn't do anything, but it's a first step.

The approach is to have a ParagraphBuilder object that can record a tree of
style interior nodes and text leaves. The build() function then applies
container-level styling information (such as TextAlign) and returns a Paragraph
object that can undergo layout and paint.

The inputs to the builder process are immutable style objects constructed from
primitive values. These primitives are currently carbon-copies of the primitive
we use in the framework today. After this patch lands, I'll convert the frame
to re-expose these values instead of re-defining them.
2015-09-02 01:28:54 -07:00