From 3e1efd150939da55df0af64d05bb5403c77e1a83 Mon Sep 17 00:00:00 2001 From: "enne@chromium.org" Date: Fri, 1 Nov 2013 23:09:54 +0000 Subject: 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 --- cc/resources/picture_pile_impl.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cc/resources/picture_pile_impl.cc') 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 -- cgit v1.1