diff options
author | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-01 23:09:54 +0000 |
---|---|---|
committer | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-01 23:09:54 +0000 |
commit | 3e1efd150939da55df0af64d05bb5403c77e1a83 (patch) | |
tree | fe98a4e3ea1154df5f86e92deb6335bf418d6709 /cc/resources/picture_pile_impl.cc | |
parent | 5e53d09b6a5296e6a15f4b49e6fc5d36b869d1f9 (diff) | |
download | chromium_src-3e1efd150939da55df0af64d05bb5403c77e1a83.zip chromium_src-3e1efd150939da55df0af64d05bb5403c77e1a83.tar.gz chromium_src-3e1efd150939da55df0af64d05bb5403c77e1a83.tar.bz2 |
cc: Allow PicturePile tests to unset debug canvas clearing
This is a followup to https://codereview.chromium.org/51433003/.
Without this, it's hard to write tests that verify raster behavior
because the debug canvas clearing sets all the bitmap pixels to some
arbitrary debug color before doing any rastering.
R=brianderson@chromium.org
BUG=none
Review URL: https://codereview.chromium.org/47603018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232507 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/resources/picture_pile_impl.cc')
-rw-r--r-- | cc/resources/picture_pile_impl.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cc/resources/picture_pile_impl.cc b/cc/resources/picture_pile_impl.cc index 3411b7f..44a52b8 100644 --- a/cc/resources/picture_pile_impl.cc +++ b/cc/resources/picture_pile_impl.cc @@ -92,10 +92,10 @@ void PicturePileImpl::RasterToBitmap( gfx::Rect canvas_rect, float contents_scale, RenderingStatsInstrumentation* rendering_stats_instrumentation) { -#ifndef NDEBUG - // Any non-painted areas will be left in this color. - canvas->clear(DebugColors::NonPaintedFillColor()); -#endif // NDEBUG + if (clear_canvas_with_debug_color_) { + // Any non-painted areas will be left in this color. + canvas->clear(DebugColors::NonPaintedFillColor()); + } // If this picture has opaque contents, it is guaranteeing that it will // draw an opaque rect the size of the layer. If it is not, then we must |