149 Commits

Author SHA1 Message Date
Jason Simmons
7983d5f0c5 Fix a memory leak in CanvasImageDecoder
CanvasImageDecoder is instantiated with a callback into a Dart closure.
That closure was holding references to the ImageDecoder and the returned
Image.  The circular reference between the ImageDecoder and the callback
prevented the objects from being GCed, resulting in leakage of the image
buffer.

CanvasImageDecoder will now destroy the callback after it is invoked,
thus releasing its handle to the Dart closure.
2015-10-27 15:05:30 -07:00
Chinmay Garde
1c19bdbd36 Merge pull request #1790 from chinmaygarde/master
Update Dart revision
2015-10-26 11:19:05 -07:00
Chinmay Garde
ae7f980d31 Update Dart revision 2015-10-26 11:12:03 -07:00
Adam Barth
3327356aee Roll Skia 2015-10-26 10:36:00 -07:00
Adam Barth
0c03d1c560 Rework how we lookup native functions from Dart
This patch changes how we lookup native functions from Dart to be more
extensible. This patch paves the way for removing the dart:ui_internals
library.
2015-10-25 00:41:45 -07:00
Adam Barth
01c14ff74b Remove a bunch of dead code
I left this code along in my uber patch to remove the DOM and CSS, but it's
just as dead. Also, move lone files out of dead directories into more sensible
places.
2015-10-24 16:09:21 -07:00
Adam Barth
a5768f2718 Remove the DOM and CSS
We don't use the DOM or CSS anymore. Instead, we work directly with the render
tree.
2015-10-24 00:26:24 -07:00
Adam Barth
1a5465c570 Delete OldTextPainter
Also, delete all references to DOM APIs.
2015-10-23 12:07:55 -07:00
Adam Barth
f1f26c93e5 Change VelocityTracker to understand new pointer values
Now we use one velocity tracker per pointer.

Path by Kris Giesing.

Fixes #1704
2015-10-23 10:07:19 -07:00
Adam Barth
08729e37d2 Fix some fiddly bits in ParagraphBuilder 2015-10-23 09:47:02 -07:00
Adam Barth
a066323bd6 Fix Android build
RTLD_SELF doesn't appear to be defined on Android.
2015-10-23 08:54:05 -07:00
Adam Barth
eb594bffdc Make NewTextPainter actually work
The NewTextPainter is still disabled by default. A future patch will flip the
flag to enable it.

This patch uses a new approach to writing bindings by encoding data into array
buffers. This approach is more efficient than the existing IDL based approach.
If this works out well, we should convert our other performance-sensitive
interfaces to this approach in future patches.
2015-10-23 08:41:23 -07:00
Chinmay Garde
d6ff8e90b0 Switch to using precompiled snapshots on iOS 2015-10-22 17:27:40 -07:00
Adam Barth
938abc3142 Add reset to Path
Fixes #88
2015-10-22 16:36:07 -07:00
Adam Barth
fa3b51c0be Offset constructor is missing types
Fixes #1730
2015-10-22 08:56:01 -07:00
Adam Barth
9422e0a427 Don't use a \0 to separate base and Dart trace events
Instead, we can just concatenate the records together, which means you can view
the generated trace file without post-processing. Also, I've made the trace
file world-readable, so that you can trace a device without needing root
access.
2015-10-21 15:14:19 -07:00
Jason Simmons
7e301ebf8f Update to mojo 5f74f421c1fa8fa691360294d9ada303ccf6de4b
* Remove most of mojo/dart/embedder
  * Update roll.py to only import a subset of mojo/dart/embedder
* Add mojo/dart/observatory
* Update mojo_sdk_revision to get fixes to dart_pkg.py
2015-10-21 13:26:54 -07:00
Adam Barth
1782be8d98 Remove old setFoo functions on Paint
We now just use Dart properties, which is more idiomatic.
2015-10-19 12:21:34 -07:00
Adam Barth
edb7d79c86 Update includes to account for network service move 2015-10-19 10:30:24 -07:00
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
Jason Simmons
10c8e321d8 Merge pull request #1569 from jason-simmons/mojo_merge_client
Update to mojo 4fe7bc6c228b3a2939cd3635ebd701f88eeca55d
2015-10-12 10:10:45 -07:00
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
d3a5b2c390 Update to mojo 4fe7bc6c228b3a2939cd3635ebd701f88eeca55d 2015-10-09 17:27:33 -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