Skip to content

Conversation

@liyuqian
Copy link
Contributor

@liyuqian liyuqian commented Jun 19, 2018

This is a follow up on flutter/engine#5420
and #18057

Note that our raster cache will most likely cache the SkPicture so
this should NOT have a big performance impact by itself. We'll
only get a small speedup before raster cache kicks in.

Once the raster cache is disabled, we can see that complex_layout
scroll speedups from 11ms/frame to 9ms/frame. With raster cache,
it's about 8ms/frame. (All on my Nexus 5X).

For flutter_gallery transition test, we get a big speedup from 38.5ms/frame
to 17.5ms/frame without raster cache. With raster cache and this PR,
it's about 15.5ms/frame.

So with this PR, the raster cache becomes much less important
at least for our own benchmarks.

@liyuqian liyuqian requested review from Hixie and chinmaygarde June 19, 2018 21:05
@liyuqian liyuqian force-pushed the nosavelayer branch 3 times, most recently from e91d2bd to 82b936a Compare June 20, 2018 18:11
This is a follow up on flutter/engine#5420
and flutter#18057

As you can see from the diff, we also mistakenly saveLayer before
the clip at some places previously.
@liyuqian
Copy link
Contributor Author

Ping @chinmaygarde ...

canvas.saveLayer(bounds, new Paint());
} else {
canvas.save();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

this sounds like it breaks the rendering, is there a test that verifies that this is ok?

Copy link
Contributor

Choose a reason for hiding this comment

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

ah, that's #18729
please add a golden test when fixing this. thanks.

@Hixie
Copy link
Contributor

Hixie commented Jun 22, 2018

Shouldn't this land at the same time as the clip changes? It seems weird to land this without allowing people to control how the clips are done, since it's a breaking change.

@liyuqian
Copy link
Contributor Author

I'll add a golden test once #18739 lands.

I landed this earlier because we've already removed saveLayer from the C++ engine side and no one seems to be bothered by the difference. Moreover, this PR opens our way to explore performance improvements on raster caches.

@liyuqian liyuqian deleted the nosavelayer branch July 13, 2018 19:48
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 10, 2021
@dnfield
Copy link
Contributor

dnfield commented Dec 6, 2021

@flar would the optimizations in flutter/engine#29775 make this unnecessary?

@flar
Copy link
Contributor

flar commented Dec 6, 2021

@flar would the optimizations in flutter/engine#29775 make this unnecessary?

These are unrelated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants