未验证 提交 508884af 编写于 作者: L liyuqian 提交者: GitHub

Call SkAutoCanvasRestore with doSave = true (#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.
上级 e8fd58a5
......@@ -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());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册