105 Commits

Author SHA1 Message Date
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
Adam Barth
b379439e37 Remove some unused dart:sky IDLs
This CL deletes a bunch of unused IDL files and removes some dead code in the
engine.
2015-09-02 00:09:43 -07:00
Adam Barth
f9201ea9a6 Improve the Paint API in dart:sky
Now that we've hoisted Paint into the VM, we can expose these values as normal
properties. After we've updated all the callers, I'll remove the old setters.
2015-09-01 23:28:12 -07:00
Adam Barth
73d29cfd36 Fix typos in dart:sky
We renamed lerpNum to lerpDouble and forgot to update these callers.
2015-09-01 23:21:35 -07:00
Adam Barth
96e203329c Move lerp for the engine types into dart:sky
This patch just adds them to dart:sky. A future patch will actually use them in
the framework once we've published an updated sky_engine package. Also, add
dartdoc to the classes touched in this patch.
2015-08-31 09:25:22 -07:00
Alhaad Gokhale
e2b4149320 Go back to master. 2015-08-27 18:16:45 -07:00
James Robinson
8b4bdd242d Use C bindings to Mojo GL entry points exclusively 2015-08-27 15:58:24 -07:00
Chinmay Garde
31f7fa8ddd Update skia to latest revision 2015-08-26 15:28:05 -07:00
James Robinson
c8eff5e44f Update to mojo d259eb58aa59e14a13d5e0dc3984b855b475ba09
This updates to mojo commit d259eb58aa59 and limits the roll script to
only pull in the parts of //mojo that are currently being used. More
stuff will be dropped in the future.
2015-08-25 14:56:25 -07:00
Adam Barth
96df6c373c Use sky.SceneBuilder to upload Layer tree to C++
We still use SkPicture as our rasterization backend, but now we're uploading
our layer tree to C++. A future patch will push the layer tree deeper into the
system and we'll eventually switch backends.
2015-08-25 13:41:37 -07:00
Adam Barth
aaacd90b8e Switch to the other stack trace printer 2015-08-21 14:55:46 -07:00
Adam Barth
f2faa74f98 Update TransferMode.dart 2015-08-20 14:13:53 -07:00
Adam Barth
7f0a28952a Uncaught exceptions get two stack traces
Now we print Dart_GetError only when we don't have a stack trace. Also, improve
the usability of the sky_shell command line tool by defaulting to "packages"
for the package-root and not crashing when we don't have a package-root until
we actually try to load a package. Finally, remove console spam when we fail to
bind the observatory port.

Fixes #689
2015-08-20 12:09:53 -07:00