106 Commits

Author SHA1 Message Date
Hixie
33e6a76949 toString()ify more stuff
- truncate pixel values to 1dp since there's really no point being told
  the Size is 302.98732587287 by 648.28498579187.

- describe more Widgets so that debugDumpApp() is more useful.

- remove bufferValue from ProgressIndicator (cc @hansmuller) since it's
  not yet implemented.

- half-hearted toString() for ThemeData. There's no point making a
  complete one, since it would cause line-wrap even on big monitors in
  debugDumpApp dumps, and you can easily get the actual values from a
  debugging if that's the issue.

- flesh out BoxConstraints.toString() so that fully unconstrained and
  fully infinite constraints are called out explicitly. I experimented
  with adding even more special cases, e.g. calling out unconstrained
  widths with fixed heights, etc, but it made the output less readable.

- remove a redundant _updateVariable() in AnimatedContainer (cc
  @abarth).

- add more information to RenderView.toString().
2015-10-17 17:55:17 -07:00
Hixie
c412c31646 RelativeRect
Introduce a class that can describe the metrics used in a Positioned
widget, to enable easier manipulation and storage of the values, e.g.
for animation purposes.
2015-10-16 17:01:39 -07:00
Hans Muller
251dd27500 Revised LinearGradient ctor checking.
It's OK to just specify the colors list.
2015-10-15 15:46:03 -07:00
John McCutchan
c8d790b900 Roll Dart runtime forward to 6aab1cecb25f8e04087320f2082336073628afb4
Roll Dart runtime forward to:

6aab1cecb25f8e04087320f2082336073628afb4

Roll Observatory pub packages to:

5c199c5954146747f75ed127871207718dc87786

---

Update to new isolate create callback signature.
2015-10-14 13:27:05 -07:00
Adam Barth
7026c60b56 Expose Canvas.drawImageNine
This patch is the first step towards supporting nine-patch images. See #1309.
2015-10-13 11:15:54 -07:00
Jason Simmons
5bdbdb5a80 Merge pull request #1583 from jason-simmons/mojo_merge_client_part2
Update to mojo aff2415d1e1f4c4a16b3bb608d4dc17c4e924667
2015-10-13 09:58:59 -07:00
Ian Hickson
0252c38d2e Merge pull request #1585 from Hixie/strong-lint
Lots of trivial warning fixes
2015-10-12 16:35:28 -07:00
Adam Barth
5fc5d3e0f0 Remove dart:ui_builtin_natives
Now this code is just in dart:ui.
2015-10-12 16:33:15 -07:00
Hixie
9f174def11 Lots of trivial warning fixes
Add type annotations in many places.
Fix some identifiers to have more lint-satisfying names.
Make all operator==s consistent in style.
Reorder some functions for consistency.
Make ParentData no longer dynamic, and fix all the code around that.
2015-10-12 16:31:20 -07:00
Jason Simmons
69b47bfab9 Update to mojo 298d9942de7819c4a837b049bc98d2cbcd61554f 2015-10-12 15:34:11 -07:00
Adam Barth
8d20440658 Start sketching out new dart:ui API
This patch starts down the process of cleaning up the dart:ui API. In this
approach, we use Dart code to specify the interface instead of IDL. The code in
this patch is far from complete. It's just a sketch to see how this sort of
approach might work.
2015-10-12 11:12:05 -07:00
Adam Barth
72c103cefa Rename dart:sky to dart:ui 2015-10-09 19:27:13 -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
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
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
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
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
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
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