Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: tools/PictureRenderer.cpp

Issue 136553004: Fix MESA cruft appearing in 8888 vs. gpu telemetry runs (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "PictureRenderer.h" 8 #include "PictureRenderer.h"
9 #include "picture_utils.h" 9 #include "picture_utils.h"
10 #include "SamplePipeControllers.h" 10 #include "SamplePipeControllers.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 canvas = SkNEW_ARGS(SkCanvas, (device.get())); 171 canvas = SkNEW_ARGS(SkCanvas, (device.get()));
172 break; 172 break;
173 } 173 }
174 #endif 174 #endif
175 default: 175 default:
176 SkASSERT(0); 176 SkASSERT(0);
177 return NULL; 177 return NULL;
178 } 178 }
179 setUpFilter(canvas, fDrawFilters); 179 setUpFilter(canvas, fDrawFilters);
180 this->scaleToScaleFactor(canvas); 180 this->scaleToScaleFactor(canvas);
181
182 // Pictures often lie about their extent (i.e., claim to be 100x100 but
183 // only ever draw to 90x100). Clear here so the undrawn portion will have
184 // a consistent color
185 canvas->clear(SK_ColorTRANSPARENT);
181 return canvas; 186 return canvas;
182 } 187 }
183 188
184 void PictureRenderer::scaleToScaleFactor(SkCanvas* canvas) { 189 void PictureRenderer::scaleToScaleFactor(SkCanvas* canvas) {
185 SkASSERT(canvas != NULL); 190 SkASSERT(canvas != NULL);
186 if (fScaleFactor != SK_Scalar1) { 191 if (fScaleFactor != SK_Scalar1) {
187 canvas->scale(fScaleFactor, fScaleFactor); 192 canvas->scale(fScaleFactor, fScaleFactor);
188 } 193 }
189 } 194 }
190 195
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 virtual SkString getConfigNameInternal() SK_OVERRIDE { 947 virtual SkString getConfigNameInternal() SK_OVERRIDE {
943 return SkString("picture_clone"); 948 return SkString("picture_clone");
944 } 949 }
945 }; 950 };
946 951
947 PictureRenderer* CreatePictureCloneRenderer() { 952 PictureRenderer* CreatePictureCloneRenderer() {
948 return SkNEW(PictureCloneRenderer); 953 return SkNEW(PictureCloneRenderer);
949 } 954 }
950 955
951 } // namespace sk_tools 956 } // namespace sk_tools
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698