Commit 98f7acff authored by Nathan Zabriskie's avatar Nathan Zabriskie Committed by Commit Bot

Remove clip/matrix effects from CanvasResourceProvider::WritePixels

With the new RasterInterface::WritePixels API we can now upload pixels
directly to textures through RasterInterface without creating paint ops
for mailbox backed shared images. This CL modifies existing code to
prepare to use the new API. A follow up CL will actually hook up the new
API for CanvasResourceProviderSharedImage.

Bug: 1063725
Change-Id: Id5cd411e94d1fd8721d5491673f6120bcd6ed33c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2210738
Commit-Queue: Khushal <khushalsagar@chromium.org>
Reviewed-by: default avatarFernando Serboncini <fserb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771922}
parent 58a870c6
...@@ -1361,14 +1361,6 @@ bool CanvasResourceProvider::WritePixels(const SkImageInfo& orig_info, ...@@ -1361,14 +1361,6 @@ bool CanvasResourceProvider::WritePixels(const SkImageInfo& orig_info,
EnsureSkiaCanvas(); EnsureSkiaCanvas();
// Apply clipstack to skia_canvas_ and then restore it to original state once
// we leave this scope. This is needed because each recording initializes and
// resets this state after every flush. restore_clip_stack_callback_ sets the
// initial save required for a restore.
cc::PaintCanvasAutoRestore auto_restore(skia_canvas_.get(), false);
if (restore_clip_stack_callback_)
restore_clip_stack_callback_.Run(skia_canvas_.get());
return GetSkSurface()->getCanvas()->writePixels(orig_info, pixels, row_bytes, return GetSkSurface()->getCanvas()->writePixels(orig_info, pixels, row_bytes,
x, y); x, y);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment