Commit Graph

254 Commits

Author SHA1 Message Date
liyuqian e2a449a519 Move canvas clear after preroll (#7923)
This will reduce 1 render target switch when preroll paints some raster
cache.
2019-02-22 12:48:04 -08:00
Chris Bracken f1f19bba8f Revert "Revert "Revert "Reland PerformanceOverlayLayer golden test (#7863)" (#7895)" (#7911)" (#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 3f0ce769e2.
2019-02-21 17:04:34 -08:00
liyuqian 3f0ce769e2 Revert "Revert "Reland PerformanceOverlayLayer golden test (#7863)" (#7895)" (#7911)
This reverts commit 6d8bd99afb.
2019-02-21 15:27:37 -08:00
Chris Bracken 6d8bd99afb Revert "Reland PerformanceOverlayLayer golden test (#7863)" (#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 8427d73c83.
2019-02-20 20:45:39 -08:00
liyuqian 8427d73c83 Reland PerformanceOverlayLayer golden test (#7863)
* Revert "Revert "Add mock capability to PerformanceOverlayLayer (#7537)" (#7765)"

This reverts commit 693645e464.

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

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 f37b09a11b [fuchsia][SCN-1054] Map elevation onto -Z in Scenic (#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 347d690b29 Add support for new Scenic clip planes. (#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 693645e464 Revert "Add mock capability to PerformanceOverlayLayer (#7537)" (#7765)
This reverts commit 5f3f3bd983.
2019-02-09 00:13:14 -08:00
liyuqian 68396ae3a3 Throttle picture raster cache (#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 5f3f3bd983 Add mock capability to PerformanceOverlayLayer (#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
Adam Barth aa901fc84a [fuchsia] Update path to fuchsia.ui.scenic (#7731)
This target is now in //sdk/fidl.
2019-02-07 22:07:24 -08:00
Adam Barth c40d6dacc7 [fuchsia] Update scenic include (#7708)
This header is now spelled thusly.
2019-02-07 10:45:21 -08:00
liyuqian 68d9ac44ec Revert "Lower the threshold to raster cache pictures (#7687)" (#7701)
This reverts commit 2f18c32862.
2019-02-05 16:02:44 -08:00
liyuqian 2f18c32862 Lower the threshold to raster cache pictures (#7687)
After removing clips by default, the OpCount of a picture drops
significantly. That makes our old threshold suboptimal. The new
threshold reflects the clip change and will improve our scroll
performance by ~10% for complex_layout and flutter_gallery scroll
benchmarks:

(flutter_gallery) home_scroll_perf frame raster time:
average		9.1ms	-> 7.4ms
90th_percentile	11.3ms	-> 9.2ms
99th_percentile	45ms	-> 38ms

complex_layout_scroll_perf frame raster time:
average		4.8	-> 4.4ms
90th_percentile	7.8ms	-> 5.4ms
99th_percentile	19ms	-> 17ms

This should also help mitigate issues like
https://github.com/flutter/flutter/issues/24782
2019-02-04 14:56:13 -08:00
liyuqian 4812a2af11 DCHECK that clip layer's behavior isn't none (#7659)
This will further guard that the framework won't forget to set the
clip behavior.

This has been tested with the flutter/flutter framework
`flutter test --local-engine=host_debug_unopt`
to ensure a successful engine roll.
2019-02-04 13:31:21 -08:00
liyuqian eaae8a67bc Retained rendering in Fuchsia PhysicalShapeLayer (#6558)
For flutter/flutter#23535

When this lands/rolls into Fuchsia, a manual roll with https://fuchsia-review.googlesource.com/c/topaz/+/241557 is needed.
2019-02-04 13:31:10 -08:00
liyuqian 2972c71f3a Fix typos in Fuchsia (#7563) 2019-01-23 13:27:51 -08:00
Brian Osman 50ddc3712f Remove SkColorSpaceXformCanvas, use color-managed SkSurfaces instead (#7548)
Behavior (visual) changes should be very minor. Things that are to be expected:
* A few things were not color managed correctly by the transform canvas (color emoji, some color filters). Those will be handled correctly with the tagged surfaces (although we're always transforming to sRGB, so nothing should change until we target a wider gamut).
* Image filtering will happen in the source color space, rather than the destination. Very minor.
* The transform canvas did caching of images in the destination color space. Now, the conversion happens at draw time. If there are performance issues, images can be pre-converted to the destination with makeColorSpace().
2019-01-22 15:34:51 -05:00
liyuqian d5d6bd2c5a Fix suspicious typo "painted" to "paint" (#7530)
Since it's adding to paint_layers_, I think the "painted" is a typo of
"paint". It's also a misleading typo which mistakenly let people believe
that the layer has already been painted.
2019-01-18 13:44:30 -08:00
liyuqian e7ade51da3 Remove unused headers (#7511) 2019-01-17 07:18:43 +08:00
liyuqian 5ce5ace6ea Avg ms/frame instead of FPS in performance overlay (#7443)
Computing FPS from max ms/frame is misleading and we're no longer
just using 60 FPS displays.
2019-01-15 07:16:24 +08:00
reed-at-google fea645b801 update site to use SkFont for text fields (#7464) 2019-01-14 11:22:58 -05:00
Jason Simmons 0c11836c9c Use anti-aliasing when drawing text in the performance overlay (#7445)
The engine dropped the ability to draw non anti-aliased text in
https://fuchsia.googlesource.com/third_party/freetype2/+/a10b062df0c8958d69377aa04ea6554a9961a111

Fixes https://github.com/flutter/flutter/issues/26387
2019-01-10 15:28:48 -08:00
liyuqian ba117366ef Compute cull_rect and optimize in Layer::Preroll (#6923)
This PR replaces the unused `PrerollContext::child_paint_bounds` with `PrerollContext::cull_rect` so we can prune unnecessary preroll tasks (especially cache) based on clips. This PR fixes https://github.com/flutter/flutter/issues/24712

Performance test has been added (https://github.com/flutter/flutter/pull/25381) to make sure that we won't regress again in the future.

Note that the cull_rect here is very similar to those removed in https://github.com/flutter/engine/pull/6352 .     We can't compute cull rects in SceneBuilder because of retained layers. But we can still compute and use them to optimize performance in Preroll.
2018-12-18 09:54:52 -08:00