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

Side by Side Diff: gm/blurrect.cpp

Issue 371023005: Add always-threaded SkRecord quilt tests. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: bigger tile -> more GMs can quilt Created 6 years, 5 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
« no previous file with comments | « gm/bitmapshader.cpp ('k') | gm/blurroundrect.cpp » ('j') | 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 "gm.h" 8 #include "gm.h"
9 #include "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 this->drawProcs(canvas, r, paint, true, procs, SK_ARRAY_COUNT(pr ocs)); 108 this->drawProcs(canvas, r, paint, true, procs, SK_ARRAY_COUNT(pr ocs));
109 canvas->restore(); 109 canvas->restore();
110 110
111 canvas->translate(0, SK_ARRAY_COUNT(procs) * r.height() * 4/3 * scales[s]); 111 canvas->translate(0, SK_ARRAY_COUNT(procs) * r.height() * 4/3 * scales[s]);
112 } 112 }
113 canvas->restore(); 113 canvas->restore();
114 canvas->translate(2 * r.width() * 4/3 * scales[s], 0); 114 canvas->translate(2 * r.width() * 4/3 * scales[s], 0);
115 } 115 }
116 } 116 }
117 117
118 virtual uint32_t onGetFlags() const { return kSkipPipe_Flag | kSkipTiled_Fla g; } 118 virtual uint32_t onGetFlags() const { return kSkipPipe_Flag; }
119 119
120 private: 120 private:
121 void drawProcs(SkCanvas* canvas, const SkRect& r, const SkPaint& paint, 121 void drawProcs(SkCanvas* canvas, const SkRect& r, const SkPaint& paint,
122 bool doClip, const Proc procs[], size_t procsCount) { 122 bool doClip, const Proc procs[], size_t procsCount) {
123 SkAutoCanvasRestore acr(canvas, true); 123 SkAutoCanvasRestore acr(canvas, true);
124 for (size_t i = 0; i < procsCount; ++i) { 124 for (size_t i = 0; i < procsCount; ++i) {
125 if (doClip) { 125 if (doClip) {
126 SkRect clipRect(r); 126 SkRect clipRect(r);
127 clipRect.inset(STROKE_WIDTH/2, STROKE_WIDTH/2); 127 clipRect.inset(STROKE_WIDTH/2, STROKE_WIDTH/2);
128 canvas->save(); 128 canvas->save();
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 } 385 }
386 private: 386 private:
387 typedef BlurRectCompareGM INHERITED; 387 typedef BlurRectCompareGM INHERITED;
388 }; 388 };
389 389
390 390
391 ////////////////////////////////////////////////////////////////////////////// 391 //////////////////////////////////////////////////////////////////////////////
392 392
393 DEF_GM(return new BlurRectGM("blurrects", 0xFF);) 393 DEF_GM(return new BlurRectGM("blurrects", 0xFF);)
394 DEF_GM(return new BlurRectDirectGM("blurrect_gallery");) 394 DEF_GM(return new BlurRectDirectGM("blurrect_gallery");)
OLDNEW
« no previous file with comments | « gm/bitmapshader.cpp ('k') | gm/blurroundrect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698