293 Commits

Author SHA1 Message Date
bungeman
ead69ba45a Replace Skia font macros with enums. (flutter/engine#8920)
This mechanically replaces kXXX_SkTextEncoding with SkTextEncoding::kXXX
and kXXX_SkFontHinting with SkFontHinting::kXXX. This will allow Skia to
remove these old macro constants and get everyone on the new enums.
2019-05-13 11:11:49 -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
liyuqian
41077726ae Check the matrix in pushTransform (flutter/engine#8758)
Fixes flutter/flutter#31650
2019-04-26 14:09:53 -07:00
David Worsham
e35ce68264 [scenic] Purge references to Mozart (flutter/engine#8712)
We also rename all MZ-* bugs to SCN-*.

SCN-580 #comment
2019-04-24 12:26:25 -07:00
liyuqian
39e920cd1a Document that OpacityLayer's children are nonempty (flutter/engine#8707)
See https://github.com/flutter/flutter/issues/31517
2019-04-23 15:02:57 -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
liyuqian
452e630ee2 Generate layer unique id for raster cache key (flutter/engine#8637)
The raw pointer isn't a reliable id as the allocator can reuse an
address that's just been released for another layer.

This will fix Fuchsia bug FL-216.

This problem was not affecting non-Fuchsia Flutter probably because
non-Fuchsia Flutter purges the raster cache key much more frequently so
we won't see a key collision. In Fuchsia, as the key has to wait for the
Vulkan surface to render asynchronously, this suddenly becomes an issue.
2019-04-18 14:14:06 -07:00
liyuqian
9607d1257d Reland elevation test (flutter/engine#8633)
Reland "Add a unit test for PhysicalShapeLayer (#8616)"

This reverts commit 3e1caa0959c5d9f673b2d7c7ed0d9befb1b42353.

The only change is the namespace.
2019-04-18 10:56:24 -07:00
Chinmay Garde
3e1caa0959 Revert "Add a unit test for PhysicalShapeLayer (#8616)" (flutter/engine#8627)
This reverts commit 6f4740c28475c294821aa9229c15f367bb90fa6a.
2019-04-17 17:47:58 -07:00
liyuqian
6f4740c284 Add a unit test for PhysicalShapeLayer (flutter/engine#8616)
An unnecessary PrerollContext copy is also removed. The added unit test will catch the error if we forget to subtract the elevation after the copy removal.

This change has been tested with the framework (`flutter test --local-engine=host_debug_unopt`).
2019-04-17 17:34:11 -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
bungeman
3d998a667a Remove call to SkFont::setLinearMetrics (flutter/engine#8612)
This particular call doesn't do anything since the default is false
anyway. In addition Skia is looking to remove this flag since setting it
to true is now synonymous with setting the hinting to none.
2019-04-17 15:13:19 -04:00
Zachary Anderson
aa883ac3f8 [fuchsia] Fix SceneUpdateContext for new PaintContext field (flutter/engine#8608) 2019-04-17 09:58:58 -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
liyuqian
6a28ed4830 Check that TransformLayer has a finite matrix (flutter/engine#8585)
To catch issues like https://github.com/flutter/flutter/issues/30586

https://github.com/flutter/flutter/pull/31097 will trigger this CHECK
if https://github.com/flutter/engine/pull/8467 were reverted and the
transform_ were not initialized in this PR.
2019-04-16 20:36:25 -07:00
Qxyat
500f19660d Composite Embedded Views with the correct GrContext
PaintRecorder Canvases are not associated with GrContexts.
2019-04-16 14:13:34 -07:00
Jason Simmons
5be5c16460 Redo a fix for cull rect calculation on TransformLayers with a perspective transform (flutter/engine#8528)
This was originally implemented in 6eab9d08be
but was not retained when cull rects were removed from the SceneBuilder.

Fixes https://github.com/flutter/flutter/issues/30819
2019-04-10 13:00:05 -07:00
Chinmay Garde
2b4e6ce82b Merge flutter/synchronization contents into fml. (flutter/engine#8525)
When flutter/synchronization was first authored, we did not own fml (it was called fxl then). Now we do, so use a single spot for such utilities. The pipeline was meant to be a general purpose utility that was only ever used by the animator (it even has animator specific tracing), so move that to shell instead (where the animator resides).
2019-04-09 19:18:51 -07:00
reed-at-google
3781ec167c switch to newer APIs for shaders and filters (flutter/engine#8511)
* switch to newer APIs for shaders and filters

* fix formatting
2019-04-09 11:00:36 -04:00
freiling
6b46bad4ce [scenic][SCN-1054] remove dangling uses of SetTranslationRH (flutter/engine#8503)
Looks like someone added a new use of the method while I was waiting for flutter
to roll. nuking the last instance so i can move forward with deprecating and
removing it.
2019-04-08 16:32:26 -07:00
Brian Osman
015b815d0f Remove unused variable (flutter/engine#8490) 2019-04-08 11:02:11 -04:00
David Worsham
0e76733763 Add Views V2 support for Fuchsia (flutter/engine#8115) 2019-04-07 01:18:59 -07:00
liyuqian
ad93320b66 Initialize OpacityLayer's matrix to identity (flutter/engine#8467)
Should have https://github.com/flutter/flutter/issues/30586 fixed once the engine rolls.
2019-04-05 18:34:05 -07:00
reed-at-google
b33dc6002d update to use SkTileMode (flutter/engine#8439) 2019-04-04 08:41:49 -04:00
liyuqian
4813cfa506 Ensure OpacityLayer to have a single child (flutter/engine#8362)
It ensures that every OpacityLayer can be optimized by retained
rendering.

Tested with `flutter test --local-engine=host_debug_unopt` in
flutter/flutter/packages/flutter.

Related issues: #21756 #23535
2019-03-29 17:58:30 -07:00
Chinmay Garde
1a7c5d7bf3 GN Format all files in the engine. (flutter/engine#8369) 2019-03-29 12:44:57 -07:00
liyuqian
dedfd60b46 Rename threshold to access_threshold (flutter/engine#8354) 2019-03-28 14:37:00 -07:00
Michael Klimushyn
bced454415 Reduce z-fighting on Scenic (flutter/engine#8318)
Previously the engine was creating multiple `ShapeNode`s all underneath
the same root `EntityNode` at local space z=0. This caused frequent
z-fighting within Flutter layers.

This patch updates the engine to only create one ShapeNode per
EntityNode, which fixes the z-fighting independent of layer elevation.
Z-fighting is still possible from actually setting multiple layers to
the same z in world space using Flutter elevation.

flutter/flutter#25226
2019-03-28 14:05:37 -07:00
freiling
f6d9154d24 [scenic][SCN-1054] Move back off of SetTranslationRH (flutter/engine#8174)
The behavior of SetTranslation() is now in its final state so we can migrate
back off the temporary function.
2019-03-18 16:33:57 -07:00
liyuqian
ffb58ce65d Clip to clip_rect instead of paint bounds (flutter/engine#8183)
Otherwise, we'll have issues such as https://github.com/flutter/flutter/issues/29070

The engine roll that includes this PR needs a tiny golden image update. Will do a manual roll.
2019-03-18 12:43:41 -07:00
P.Y. Laligand
39b0476967 Fix include of libzx. (flutter/engine#8181) 2019-03-15 13:58:25 -07:00
Kaushik Iska
b98bf7c96c Update overlays_gr_context_ correctly (flutter/engine#8175)
There can be cases where SubmitFrame gets called
before overlays are a part of the frame, in these
cases, we should not update the GRContext ahead of time.

This commit makes it so we will update it only when
the frame really shows the overlay.

This addresses: https://github.com/flutter/flutter/issues/28920
2019-03-15 08:35:48 -07:00
Dan Field
bb69b40272 Anti-Aliasing for shape layers (flutter/engine#8157) 2019-03-13 14:26:42 -07:00
Chinmay Garde
0809280550 Reland ""Add support for trace counters with variable arguments and instrument the raster cache." (flutter/engine#8145)
This reverts commit da6e460c67c34d34eef1e9ec87b8534a379fe1f5 and fixes the
discovered on Windows builds.
2019-03-13 13:53:22 -07:00
liyuqian
7ed28478d9 Reland PerformanceOverlayLayer golden test (flutter/engine#8140)
This reverts commit c416fe99ee0ddb464ca85c0b336d679ea626a03c.

Now we shouldn't break the engine build as https://chromium-review.googlesource.com/c/chromium/tools/build/+/1480746 is landed. The golden test is disabled by default and we'll enable it later in our recipe and test it in presubmit tests.
2019-03-12 14:10:11 -07:00
Chinmay Garde
da6e460c67 Revert "Add support for trace counters with variable arguments and instrument the raster cache. (#8094)" (flutter/engine#8122)
This reverts commit 9f384e3e4cbfdf23381509a62c7023e77edcbfd8.
2019-03-11 15:09:24 -07:00
Chinmay Garde
9f384e3e4c Add support for trace counters with variable arguments and instrument the raster cache. (flutter/engine#8094) 2019-03-11 14:44:43 -07:00
liyuqian
87704e2839 Improve shadow doc in PhysicalShapeLayer (flutter/engine#8114)
The old x is confusing as it often refers to x-axis in 2D graphics.
Replace it with t which has a nice interpretation of tangent.
2019-03-11 14:30:07 -07:00
Dan Field
d6245c127f Improve elevation bounds for physical shape layers (flutter/engine#8044)
* improve elevation bounds calculation and add diagram
2019-03-05 16:32:22 -08:00
liyuqian
79c1a3fcdf Move canvas clear after preroll (flutter/engine#7923)
This will reduce 1 render target switch when preroll paints some raster
cache.
2019-02-22 12:48:04 -08:00
Chris Bracken
c416fe99ee Revert "Revert "Revert "Reland PerformanceOverlayLayer golden test (#7863)" (#7895)" (#7911)" (flutter/engine#7916)
This breaks the Linux build with:
```
[ RUN      ] PerformanceOverlayLayer.Gold
../../flutter/flow/layers/performance_overlay_layer_unittests.cc:70: Failure
Value of: golden_data != nullptr
  Actual: false
Expected: true
Golden file not found: "/b/s/w/ir/k/src/flutter/testing/resources"/performance_overlay_gold.png.
Please either set --golden-dir, or make sure that the unit test is run from the right directory (e.g., flutter/engine/src).
```

This reverts commit 3534a2c4cdfa35f921e99466013c7c8b3f03a8c3.
2019-02-21 17:04:34 -08:00
liyuqian
3534a2c4cd Revert "Revert "Reland PerformanceOverlayLayer golden test (#7863)" (#7895)" (flutter/engine#7911)
This reverts commit def147d48ee538dd7bbf0d2f0323a5d90a3d872c.
2019-02-21 15:27:37 -08:00
Chris Bracken
def147d48e Revert "Reland PerformanceOverlayLayer golden test (#7863)" (flutter/engine#7895)
Reverting this broke the flow tests for the performance overlay:

```
../../flutter/flow/layers/performance_overlay_layer_unittests.cc:70: Failure
Value of: golden_data != nullptr
  Actual: false
Expected: true
```

This reverts commit ad96de250ecc47a7c26134ad434150199539b00b.
2019-02-20 20:45:39 -08:00
liyuqian
ad96de250e Reland PerformanceOverlayLayer golden test (flutter/engine#7863)
* Revert "Revert "Add mock capability to PerformanceOverlayLayer (#7537)" (#7765)"

This reverts commit 284016b1e1d6e8badec99cbff907ddb900cd27c4.

* Add command line args for golden dir and font file
2019-02-20 16:49:39 -08:00
liyuqian
dba89c9783 Reland "Lower the threshold to raster cache pictures (#7687)" (flutter/engine#7862)
This reverts commit f2d2383aee62a8fedb784b09a395751105956e03.

https://github.com/flutter/engine/pull/7759 has landed without any
unexpected regressions. Hence we'll reland this as planned.
2019-02-19 14:46:42 -08:00
freiling
352a30e485 [fuchsia][SCN-1054] Map elevation onto -Z in Scenic (flutter/engine#7834)
Note: the SetTranslationRH function is temporary and part of the smooth
transition plan for Scenics handedness inversion. See SCN-1054 for details.

We will follow this will a change to migrate back off SetTranslationRH
Submit after https://fuchsia-review.googlesource.com/c/fuchsia/+/255056
lands in fuchsia.git
2019-02-15 15:32:56 -08:00
Josh Gargus
b9fa0b4ace Add support for new Scenic clip planes. (flutter/engine#7804)
Uses SetClipPlanesCmd in addition to the old clipping approach.
Flutter will use both clipping methods during a transition period
(Scenic will select internally which one to use).
2019-02-12 18:33:14 -08:00
Dan Field
284016b1e1 Revert "Add mock capability to PerformanceOverlayLayer (#7537)" (flutter/engine#7765)
This reverts commit a3b89e97a89a1c3bd725cf391ff7b6b0fe7e810b.
2019-02-09 00:13:14 -08:00
liyuqian
6a320ce6ae Throttle picture raster cache (flutter/engine#7759)
This decreases worst_frame_rasterizer_time_millis from 30ms to 10ms when
we enabled picture raster cache in tiles_scroll (i.e., lower the
threshold from 10 to 5).
2019-02-08 17:40:38 -08:00
liyuqian
a3b89e97a8 Add mock capability to PerformanceOverlayLayer (flutter/engine#7537)
So we can do golden test on PerformanceOverlay to avoid regression like
https://github.com/flutter/flutter/issues/26387
2019-02-08 14:47:22 -08:00