705 Commits

Author SHA1 Message Date
Chinmay Garde
5f5821e8c1 Replace lock_guard with scoped_lock and use class template argument deduction. (flutter/engine#9338) 2019-06-17 10:08:45 -07:00
Jason Simmons
14436b047f Fix the name of the channel parameter in PlatformMessage constructors (flutter/engine#9334) 2019-06-14 14:56:51 -07:00
David Worsham
c913c07e29 [scene_host] Expose Opacity and remove ExportNode (flutter/engine#9297)
SCN-947 #comment
SCN-1291 #comment
2019-06-13 10:16:21 -07:00
Zachary Anderson
35107c4dca Revert tracing changes (flutter/engine#9296)
* Revert "[fuchsia] Fix alignment of Fuchsia/non-Fuchsia tracing (#9289)"

This reverts commit e7d406fe36790b1a8161d4687a6a4a144ba44254.

* Revert "Align fuchsia and non-fuchsia tracing (#9199)"

This reverts commit 1ccb372e5f8ceaaf90f5b43b42df617d7f18d955.
2019-06-12 10:25:49 -07:00
Dan Field
899cd81833 [iOS] [a11y] Don't allow scroll views to grab a11y focus (flutter/engine#9282) 2019-06-11 18:02:47 -07:00
liyuqian
fe0db192d9 Report timings faster (100ms) in profile/debug (flutter/engine#9287)
This should satisfy the low-latency need of DevTools.

Test added:
* ReportTimingsIsCalledSoonerInNonReleaseMode
* ReportTimingsIsCalledLaterInReleaseMode
2019-06-11 16:51:20 -07:00
liyuqian
43f4c1d3c7 Make flow layers' attributes immutable (flutter/engine#9176)
For https://github.com/flutter/flutter/issues/33807

We still need to make layers' children immutable for full immutability.
That will require us to change the SceneBuilder API to build the layer
bottom up instead of top down (post-order traversal instead of pre-order
traversal).
2019-06-10 13:09:37 -07:00
Dan Field
41f7455e7d Mark semantics functions const (flutter/engine#9243) 2019-06-08 15:11:04 -07:00
liyuqian
fb0ea0ef4c Add onReportTimings and FrameRasterizedCallback API (flutter/engine#8983)
Using it, a Flutter app can monitor missing frames in the release mode, and a custom Flutter runner (e.g., Fuchsia) can add a custom FrameRasterizedCallback.

Related issues:
https://github.com/flutter/flutter/issues/26154
https://github.com/flutter/flutter/issues/31444
https://github.com/flutter/flutter/issues/32447

Need review as soon as possible so we can merge this before the end of May to catch the milestone.

Tests added:
* NoNeedToReportTimingsByDefault
* NeedsReportTimingsIsSetWithCallback
* ReportTimingsIsCalled
* FrameRasterizedCallbackIsCalled
* FrameTimingSetsAndGetsProperly
* onReportTimings preserves callback zone
* FrameTiming.toString has the correct format

This will need a manual engine roll as the TestWindow defined in the framework needs to implement onReportTimings.
2019-06-06 10:42:48 -07:00
Dan Field
1ccb372e5f Align fuchsia and non-fuchsia tracing (flutter/engine#9199) 2019-06-05 15:14:27 -07:00
David Worsham
7be67a888d [scene_host] Cleanup scene_host closures (flutter/engine#9061)
Fix null closure warnings, and a possible race condition where the
handle for the view_holder_token is destroyed on the gpu thread.  The
handle's destructor enters the isolate, so it must be destroyed on the
UI thread.

FL-257 #done
FL-269 #done
2019-06-04 12:56:03 -07:00
Gary Qian
f7100ebdd4 Text inline widget LibTxt/dart:ui implementation (flutter/engine#8207) 2019-06-03 10:32:46 -07:00
Dan Field
7513edc9c2 Preserve safe area (flutter/engine#8848)
Preserve safe area on Window regardless of insets.
2019-05-31 09:24:38 -07:00
Chinmay Garde
5efe381d1d Fix unopt variants of profile and release builds. (flutter/engine#9107)
This fixes a regression I introduced in https://github.com/flutter/engine/pull/8869 while preparing the buildroot for Fuchsia.
2019-05-28 12:42:53 -07:00
Chris Bracken
21fd6fb32a Correct typos, adopt US spellings (flutter/engine#9081)
Corects a bnuch of typeos throughout teh engien codebsae. Also makes
a couple minor Commonwealth -> US spelling adjustments for consistency
with the rest of Flutter's codebase.

Made use of `misspell` tool:
https://github.com/client9/misspell
2019-05-25 13:14:46 -07:00
Jason Simmons
6b2bdb6147 libtxt: have GetRectsForRange(strut) fall back to tight bounds if layout isn't forcing use of the strut (flutter/engine#9058) 2019-05-22 13:57:59 -07:00
Jason Simmons
869c92a3d7 Add font features (such as tabular numbers) as an option in text styles (flutter/engine#8823)
Fixes https://github.com/flutter/flutter/issues/31691
2019-05-21 16:47:57 -07:00
liyuqian
3aed059cc5 Correct the return type of addRetained (flutter/engine#9025)
It should return void as SceneBuilder::addRetained is returning void.
Thanks yjbanov@ for finding this typo!
2019-05-20 15:58:35 -07:00
Dan Field
d99581a8ea remove unnecessary [new from docs (flutter/engine#8986) 2019-05-16 19:14:10 -07:00
Dan Field
47caf42a41 Add matrix4 param to Linear gradients (flutter/engine#8985)
* Add matrix4 param to Linear gradients
2019-05-16 13:10:58 -07:00
Jason Simmons
1ff7ac0696 libtxt: add a BoxHeightStyle option based on the height of the strut (flutter/engine#8927)
See https://github.com/flutter/flutter/issues/32332
2019-05-16 11:17:20 -07:00
Matthew Dempsky
8b4a5398ae Roll tonic and update #includes (flutter/engine#8950) 2019-05-14 11:57:09 -07:00
Dan Field
038586568b update docs (flutter/engine#8928) 2019-05-13 11:44:45 -07:00
Michael Klimushyn
3d8b9b1e9c Only cache required frames (flutter/engine#8837)
Remove the extra `decodedCacheRatioCap` parameter, and the
`_frameBitmaps` member from `Codec`. This means that small looped images
will consume more CPU but prevents us from hitting OOM exceptions based
on trying to render multiple larger images.

Also switch to fDisposalMethod for caching frames.

Previously we looped over every single SkCodec::FrameInfo, tracked its
`fRequiredFrame`, and then saved any frames matching those indeces.
Doing this instead avoids that initialization loop and extra data
structure.
2019-05-13 11:18:20 -07:00
Tong Mu
fa9dec68eb Synthesize buttons for embedders (flutter/engine#8873)
* Synthesize a buttons = kPrimaryButton for events of down and move
* Add PointerEventButtons
2019-05-10 12:12:51 -07:00
Kaushik Iska
9421579df4 Expose API to decode images to specified dimensions (flutter/engine#8596)
* Dart side resize primitives exposed

* Write the codec side changes

* return un-scaled image if we can not allocate bitmap

* Format _instantiateImageCodec calls to be single lined

Move null check for size to be inner

* Address CR comments and make image resize dimensions container

* Round not trunc, also format

* Add tests, remove ImageResizeDims from api surface

* Make placeholder value public

* Make the api side changes

* Add a feature to resize pixels and also add tests

* Fix grammar and add more info
2019-05-08 13:57:35 -07:00
Dan Field
c96714ac5d new lints (flutter/engine#8849)
Dart lints added:
* Avoid optional new
* Avoid optional const
* Prefer single quotes
* Prefer default assignment `=`
2019-05-07 16:10:21 -07:00
Chinmay Garde
56e7bf84b1 Wire up Fuchsia SDK related updated for shell dependencies. #8869
This does not actually import the runners into the engine. It only sets up the targets so they need no modifications are necessary when the migration is done. The engine has been verified to build in both buildroots.
2019-05-06 18:01:59 -07:00
Dan Field
d0825ed664 fix assert (flutter/engine#8851) 2019-05-04 14:08:23 -07:00
Dan Field
712fc0f99e Add asserts to semantics.dart (flutter/engine#8846) 2019-05-04 07:47:22 -07:00
Jonah Williams
99e7daa6bc remove unecessary usage of runtimeType in dart:ui (flutter/engine#8844) 2019-05-04 00:24:41 -07:00
Michael Klimushyn
d6a9fdd8c6 Default the animated frame cache to 0 when unset (flutter/engine#8833)
This default is already set in the framework, but this also needs to be
set in the binding layer to preserve the same behavior when the
deprecated framework parameter is removed.
2019-05-03 11:30:57 -07:00
reed-at-google
1be405a33e colormatrix is now 0...1 (flutter/engine#8772)
* colormatrix is now 0...1

* reformat
2019-04-29 09:03:10 -04:00
Justin McCandless
08ad1926e8 Rename tightWidth to longestLine (flutter/engine#8706)
Renaming a brand new and unused parameter due to some discussion about connecting with the framework.
2019-04-26 16:06:12 -07:00
liyuqian
41077726ae Check the matrix in pushTransform (flutter/engine#8758)
Fixes flutter/flutter#31650
2019-04-26 14:09:53 -07:00
Todd Volkert
9f70d84295 Add Rect.fromCenter() constructor (flutter/engine#8716) 2019-04-25 14:40:29 -07:00
Zachary Anderson
0299216745 Plumb arguments from Settings to Dart main() (flutter/engine#8710) 2019-04-25 07:57:54 -07:00
Dan Field
54c25619ba Revert "Increase the memory usage estimate for EngineLayer (#8700)" (flutter/engine#8738)
This reverts commit 0163a0e8dc6020c614b58fcba2e20141c9d6e162.
2019-04-25 06:55:31 -07:00
Jason Simmons
0163a0e8dc Increase the memory usage estimate for EngineLayer (flutter/engine#8700)
EngineLayers can hold references to Skia objects and may consume significant
resources.  This change will result in more aggressive cleanup of EngineLayers
by the Dart GC.

See https://github.com/flutter/flutter/issues/31303
2019-04-23 13:25:08 -07:00
Dan Field
cc68d41b6e Reland const Rect/RRect (flutter/engine#8695) 2019-04-23 11:21:03 -07:00
Brian Osman
80ef739d5b Convert animated unpremul images to premul during decode (flutter/engine#8698)
Skia allows drawing unpremul images, but filtering them can look bad.
Internally Skia performs this transformation when creating SkImages from
encoded data (so this already happens for MakeCrossContextFromEncoded),
and for consistency/quality it should be done here, too.

Fixes #28785
2019-04-23 13:47:23 -04:00
Jason Simmons
ee3e7d242d Change Vertices.indices to use a Uint16 list to more accurately reflect Skia's API (flutter/engine#8657)
Also throw if SkVertices::Builder reports an invalid configuration.

Fixes https://github.com/flutter/flutter/issues/31270
2019-04-22 16:13:22 -07:00
Dan Field
e0283d92c7 Revert Rect/RRect 64 bit (flutter/engine#8690)
* Revert "fix toString (#8688)"

This reverts commit c9a0f50ecc62899952ff693ed67d022d510d9453.

* Revert "Make Rect and RRect use 64 bit doubles, and make them const-able (#8565)"

This reverts commit d98c2e2df0427aad3bd824f41d804ccc56eee367.
2019-04-22 15:45:59 -07:00
Dan Field
c9a0f50ecc fix toString (flutter/engine#8688) 2019-04-22 14:12:31 -07:00
Dan Field
d98c2e2df0 Make Rect and RRect use 64 bit doubles, and make them const-able (flutter/engine#8565)
* Make Rect and RRect 64bit and const-able
2019-04-22 12:58:48 -07:00
Matthew Dempsky
2107712b0f Replace ThreadLocal with ThreadLocalUniquePtr<T> (flutter/engine#8659)
Fixes https://github.com/flutter/flutter/issues/31292.
2019-04-19 17:33:46 -07:00
Matthew Dempsky
7f196fec73 Remove unnecessary DartIO::EntropySource wrapper (flutter/engine#8635) 2019-04-18 17:15:04 -07:00
Justin McCandless
d0d978fd86 Tight Paragraph Width (flutter/engine#8530)
Calculate and expose paragraph tightWidth to the framework to allow drawing Text based on this.
2019-04-18 09:08:41 -07:00
liyuqian
27e4dac06b Rename flow namespace to flutter (flutter/engine#8615)
This follows our namespace change from shell to flutter: https://github.com/flutter/engine/pull/8520.
2019-04-17 14:38:45 -07:00
Michael Klimushyn
5df695efdf Pipe Z bounds from ViewportMetrics to Flow (flutter/engine#8583)
This is the first step in making Flutter aware of and responsive to Z
bound overflow. On its own this patch shouldn't result in any changes in
behavior. This will need to be followed up with a patch in Fuchsia's
Flutter runner to set the Z bounds after this lands, and another patch
in the engine actually implementing the desired overflow behavior.

This Z bound info is routed through the engine itself to make sure the
bounds in flow are truly consistent from the Fuchsia runner. However
these values should eventually be exposed to the framework as well.
2019-04-17 09:56:46 -07:00