From 17cc3eaeafd507a78b7f713f8981a6ed67569964 Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Wed, 15 Jan 2014 14:51:25 +0000 Subject: [PATCH] When a picture lies about its size (i.e., claims to be 100x100 but only ever draws to 90x100) arbitrary pixel differences can appear in the undrawn portion. This is causing spurious differences to appear in the 8888 vs. gpu telemetry results. R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/136553004 git-svn-id: http://skia.googlecode.com/svn/trunk@13084 2bbb7eff-a529-9590-31e7-b0007b416f81 --- tools/PictureRenderer.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp index 53654b9..b81f058 100644 --- a/tools/PictureRenderer.cpp +++ b/tools/PictureRenderer.cpp @@ -178,6 +178,11 @@ SkCanvas* PictureRenderer::setupCanvas(int width, int height) { } setUpFilter(canvas, fDrawFilters); this->scaleToScaleFactor(canvas); + + // Pictures often lie about their extent (i.e., claim to be 100x100 but + // only ever draw to 90x100). Clear here so the undrawn portion will have + // a consistent color + canvas->clear(SK_ColorTRANSPARENT); return canvas; } -- 2.7.4