diff options
author | alokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-13 01:33:23 +0000 |
---|---|---|
committer | alokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-13 01:33:23 +0000 |
commit | 4aedf01a112e98b92a8e6e0016a053d5e06176ec (patch) | |
tree | ea6bfbde1a2284eadba994f61912ff6a0f4e3e9d /cc/resources | |
parent | c31baee96bc356cf69fec664ea0c4ab958c6d327 (diff) | |
download | chromium_src-4aedf01a112e98b92a8e6e0016a053d5e06176ec.zip chromium_src-4aedf01a112e98b92a8e6e0016a053d5e06176ec.tar.gz chromium_src-4aedf01a112e98b92a8e6e0016a053d5e06176ec.tar.bz2 |
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
Diffstat (limited to 'cc/resources')
-rw-r--r-- | cc/resources/picture_pile_impl.cc | 1 | ||||
-rw-r--r-- | cc/resources/picture_pile_impl.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/cc/resources/picture_pile_impl.cc b/cc/resources/picture_pile_impl.cc index d0f6cf9..bb46747 100644 --- a/cc/resources/picture_pile_impl.cc +++ b/cc/resources/picture_pile_impl.cc @@ -98,6 +98,7 @@ void PicturePileImpl::RasterToBitmap( const gfx::Rect& canvas_rect, float contents_scale, RenderingStatsInstrumentation* rendering_stats_instrumentation) { + canvas->discard(); if (clear_canvas_with_debug_color_) { // Any non-painted areas in the content bounds will be left in this color. canvas->clear(DebugColors::NonPaintedFillColor()); diff --git a/cc/resources/picture_pile_impl.h b/cc/resources/picture_pile_impl.h index 54a6988..e4e82f9 100644 --- a/cc/resources/picture_pile_impl.h +++ b/cc/resources/picture_pile_impl.h @@ -46,6 +46,7 @@ class CC_EXPORT PicturePileImpl : public PicturePileBase { // 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 // 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( SkCanvas* canvas, const gfx::Rect& canvas_rect, |