Commit 4aedf01a authored by alokp@chromium.org's avatar alokp@chromium.org

cc: Discard SkCanvas (frame-buffer) before rasterization.

BUG=361266

Review URL: https://codereview.chromium.org/232843006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269958 0039d316-1c4b-4281-b951-d872f2087c98
parent c31baee9
...@@ -98,6 +98,7 @@ void PicturePileImpl::RasterToBitmap( ...@@ -98,6 +98,7 @@ void PicturePileImpl::RasterToBitmap(
const gfx::Rect& canvas_rect, const gfx::Rect& canvas_rect,
float contents_scale, float contents_scale,
RenderingStatsInstrumentation* rendering_stats_instrumentation) { RenderingStatsInstrumentation* rendering_stats_instrumentation) {
canvas->discard();
if (clear_canvas_with_debug_color_) { if (clear_canvas_with_debug_color_) {
// Any non-painted areas in the content bounds will be left in this color. // Any non-painted areas in the content bounds will be left in this color.
canvas->clear(DebugColors::NonPaintedFillColor()); canvas->clear(DebugColors::NonPaintedFillColor());
......
...@@ -46,6 +46,7 @@ class CC_EXPORT PicturePileImpl : public PicturePileBase { ...@@ -46,6 +46,7 @@ class CC_EXPORT PicturePileImpl : public PicturePileBase {
// Similar to the above RasterDirect method, but this is a convenience method // Similar to the above RasterDirect method, but this is a convenience method
// for when it is known that the raster is going to an intermediate bitmap // for when it is known that the raster is going to an intermediate bitmap
// that itself will then be blended and thus that a canvas clear is required. // that itself will then be blended and thus that a canvas clear is required.
// Note that this function may write outside the canvas_rect.
void RasterToBitmap( void RasterToBitmap(
SkCanvas* canvas, SkCanvas* canvas,
const gfx::Rect& canvas_rect, const gfx::Rect& canvas_rect,
......
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