Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@liyuqian
Copy link
Contributor

@liyuqian liyuqian commented Oct 4, 2018

We first test this with OpacityLayer. This test alone (without retained rendering) should have ~30% speedup as we'll have fewer render target switches by snapshoting in the Preroll instead of saveLayer in the Paint.

In my local flutter_gallery transition perf tests, the average frame time drops from ~16ms to ~12ms.

flutter/flutter#21756

@liyuqian liyuqian requested a review from chinmaygarde October 4, 2018 21:20
@liyuqian liyuqian changed the title Allow raster caching any layer subtree [wip] Allow raster caching any layer subtree Oct 4, 2018

class ContainerLayer;

struct PrerollContext {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chinmaygarde : I moved this out so I can forward declare it in raster_cache.h

SkiaGPUObject<SkPicture> picture_;
bool is_complex_ = false;
bool will_change_ = false;
RasterCacheResult raster_cache_result_;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chinmaygarde : I removed RasterCacheResult from Layer to make it thread safe. Now we can only ask RasterCache::Get to retrieve the RasterCacheResult when we need it.

We first test this with OpacityLayer. This test alone (without retained
rendering) should have ~30% speedup as we'll have fewer render target
switches by snapshoting in the Preroll instead of saveLayer in the
Paint.

In my local flutter_gallery transition perf tests, the average frame
time drops from ~16ms to ~12ms.
@liyuqian liyuqian changed the title [wip] Allow raster caching any layer subtree Allow raster caching any layer subtree Oct 4, 2018
@liyuqian liyuqian mentioned this pull request Oct 4, 2018
liyuqian added a commit to liyuqian/engine that referenced this pull request Oct 8, 2018
liyuqian added a commit to liyuqian/engine that referenced this pull request Oct 8, 2018
@liyuqian liyuqian merged commit 6447418 into flutter:master Oct 11, 2018
liyuqian added a commit that referenced this pull request Oct 11, 2018
liyuqian added a commit that referenced this pull request Oct 11, 2018
Reverts #6442

container_layer.h file is not synced which broke the bots
liyuqian added a commit to liyuqian/engine that referenced this pull request Oct 11, 2018
liyuqian added a commit that referenced this pull request Oct 11, 2018
* Revert "Revert "Allow raster caching any layer subtree (#6442)" (#6506)"

This reverts commit c6e6da5.

* Use raw pointer for RasterCacheKey

So we won't depend on whether it's a std::unique_ptr or std::shared_ptr.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 11, 2018
flutter/engine@9cad7b6...c6e6da5

git log 9cad7b6..c6e6da5 --no-merges --oneline
c6e6da5 Revert &#34;Allow raster caching any layer subtree (flutter#6442)&#34; (flutter/engine#6506)
6447418 Allow raster caching any layer subtree (flutter/engine#6442)

The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/&#43;/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC&#39;d on the roll, and stop the roller if necessary.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 12, 2018
flutter/engine@9cad7b6...daf4447

git log 9cad7b6..daf4447 --no-merges --oneline
daf4447 Reland &#34;Allow raster caching any layer subtree (flutter#6442)&#34; (flutter/engine#6507)
c6e6da5 Revert &#34;Allow raster caching any layer subtree (flutter#6442)&#34; (flutter/engine#6506)
6447418 Allow raster caching any layer subtree (flutter/engine#6442)

The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/&#43;/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC&#39;d on the roll, and stop the roller if necessary.
engine-flutter-autoroll added a commit to flutter/flutter that referenced this pull request Oct 12, 2018
flutter/engine@9cad7b6...daf4447

git log 9cad7b6..daf4447 --no-merges --oneline
daf4447 Reland &#34;Allow raster caching any layer subtree (#6442)&#34; (flutter/engine#6507)
c6e6da5 Revert &#34;Allow raster caching any layer subtree (#6442)&#34; (flutter/engine#6506)
6447418 Allow raster caching any layer subtree (flutter/engine#6442)


The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/&#43;/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC&#39;d on the roll, and stop the roller if necessary.
liyuqian added a commit that referenced this pull request Oct 12, 2018
This reverts commit 74662ab.

This should land after #6442

* Add pragma vm:entry-point

Otherwise, an object may be both null and an instance of EnginieLayer at
the same time in Dart.
@liyuqian liyuqian deleted the cache_layer branch November 12, 2018 18:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants