OLD | NEW |
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 Loading... |
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; } | 118 virtual uint32_t onGetFlags() const { return kSkipPipe_Flag | kSkipTiled_Fla
g; } |
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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_11_simple", 25, 100, 11
);) | 375 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_11_simple", 25, 100, 11
);) |
376 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_12_simple", 25, 100, 12
);) | 376 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_12_simple", 25, 100, 12
);) |
377 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_13_simple", 25, 100, 13
);) | 377 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_13_simple", 25, 100, 13
);) |
378 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_14_simple", 25, 100, 14
);) | 378 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_14_simple", 25, 100, 14
);) |
379 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_15_simple", 25, 100, 15
);) | 379 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_15_simple", 25, 100, 15
);) |
380 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_16_simple", 25, 100, 16
);) | 380 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_16_simple", 25, 100, 16
);) |
381 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_17_simple", 25, 100, 17
);) | 381 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_17_simple", 25, 100, 17
);) |
382 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_18_simple", 25, 100, 18
);) | 382 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_18_simple", 25, 100, 18
);) |
383 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_19_simple", 25, 100, 19
);) | 383 DEF_GM(return new BlurRectGroundTruthGM("blurrect_25_100_19_simple", 25, 100, 19
);) |
384 #endif | 384 #endif |
OLD | NEW |