Call SkAutoCanvasRestore with doSave = true (flutter/engine#5432)
Although we do have a save before this SkAutoCanvasRestore so we can theoretically send in doSave = false, it's safer to set doSave to true to prevent future breakage. As discussed with mtklein@google.com and reed@google.com, saving canvas is very cheap in Skia so this should have no performance impact. Skia is also considering remove doSave argument from SkAutoCanvasRestore and always save the canvas.
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
namespace flow {
|
||||
|
||||
void RasterCacheResult::draw(SkCanvas& canvas) const {
|
||||
SkAutoCanvasRestore auto_restore(&canvas, false);
|
||||
SkAutoCanvasRestore auto_restore(&canvas, true);
|
||||
SkIRect bounds =
|
||||
RasterCache::GetDeviceBounds(logical_rect_, canvas.getTotalMatrix());
|
||||
FXL_DCHECK(bounds.size() == image_->dimensions());
|
||||
|
||||
Reference in New Issue
Block a user