-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Remove saveLayer after clip from dart #18616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e91d2bd to
82b936a
Compare
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.
|
Ping @chinmaygarde ... |
| canvas.saveLayer(bounds, new Paint()); | ||
| } else { | ||
| canvas.save(); | ||
| } |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
|
Shouldn't this land at the same time as the |
|
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. |
|
@flar would the optimizations in flutter/engine#29775 make this unnecessary? |
These are unrelated. |
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.