Repository navigation
Add a flag that checkerboards offscreen render targets created by SkCanvas.saveLayer - #3685
Conversation
|
|
||
| SkAutoCanvasRestore save(&context.canvas, false); | ||
| context.canvas.saveLayer(&paint_bounds(), nullptr); | ||
| Layer::AutoSaveLayer save(context, paint_bounds(), nullptr); |
There was a problem hiding this comment.
In the previous version of this code, we were doing a SkCanvas::save (via SkAutoCanvasRestore) -> SkCanvas::saveLayer -> PaintChildren -> SkCanvas::restore (via SkAutoCanvasRestore). In this version, we no longer have the SkCanvas::save. Is this fine? I am not sure why we did the SkCanvas::save in the first place.
There was a problem hiding this comment.
SkAutoCanvasRestore(canvas, false) doesn't do an SkCanvas::save(). The SkCanvas::save() happens within the saveLayer() call
|
|
||
| private: | ||
| const PaintContext& paint_context_; | ||
| const SkRect bounds_; |
There was a problem hiding this comment.
FTL_DISALLOW_COPY_AND_ASSIGN.
There was a problem hiding this comment.
Wait, nevermind. Didn't notice the consts.
| frame.context().engine_time(), | ||
| frame.context().memory_usage()}; | ||
| frame.context().memory_usage(), | ||
| checkerboard_offscreen_layers_}; |
There was a problem hiding this comment.
I don't notice similar updates to scene_update_context.cc. Are you sure you checked the Fuchsia build?
|
Travis is mad about paint_utils in the licenses. |
…anvas.saveLayer Fixes flutter/flutter#9473
119cfff to
2d516b0
Compare
Fixes flutter/flutter#9473