OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "SkBitmapSource.h" | 9 #include "SkBitmapSource.h" |
10 #include "SkBlurImageFilter.h" | 10 #include "SkBlurImageFilter.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 ImageFilterFastBoundGM() { | 153 ImageFilterFastBoundGM() { |
154 this->setBGColor(0xFFCCCCCC); | 154 this->setBGColor(0xFFCCCCCC); |
155 } | 155 } |
156 | 156 |
157 protected: | 157 protected: |
158 static const int kTileWidth = 100; | 158 static const int kTileWidth = 100; |
159 static const int kTileHeight = 100; | 159 static const int kTileHeight = 100; |
160 static const int kNumVertTiles = 6; | 160 static const int kNumVertTiles = 6; |
161 static const int kNumXtraCols = 2; | 161 static const int kNumXtraCols = 2; |
162 | 162 |
163 // SkPictureImageFilter doesn't support serialization yet. | |
164 uint32_t onGetFlags() const SK_OVERRIDE { | |
165 return kSkipPicture_Flag | | |
166 kSkipPipe_Flag | | |
167 kSkipPipeCrossProcess_Flag | | |
168 kSkipTiled_Flag | | |
169 kSkipScaledReplay_Flag; | |
170 } | |
171 | |
172 SkString onShortName() SK_OVERRIDE{ return SkString("filterfastbounds"); } | 163 SkString onShortName() SK_OVERRIDE{ return SkString("filterfastbounds"); } |
173 | 164 |
174 SkISize onISize() SK_OVERRIDE{ | 165 SkISize onISize() SK_OVERRIDE{ |
175 return SkISize::Make((SK_ARRAY_COUNT(gDrawMthds) + kNumXtraCols) * kTile
Width, | 166 return SkISize::Make((SK_ARRAY_COUNT(gDrawMthds) + kNumXtraCols) * kTile
Width, |
176 kNumVertTiles * kTileHeight); | 167 kNumVertTiles * kTileHeight); |
177 } | 168 } |
178 | 169 |
179 static void draw_geom_with_paint(drawMth draw, const SkIPoint& off, | 170 static void draw_geom_with_paint(drawMth draw, const SkIPoint& off, |
180 SkCanvas* canvas, const SkPaint& p) { | 171 SkCanvas* canvas, const SkPaint& p) { |
181 SkPaint redStroked; | 172 SkPaint redStroked; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 | 318 |
328 private: | 319 private: |
329 typedef GM INHERITED; | 320 typedef GM INHERITED; |
330 }; | 321 }; |
331 | 322 |
332 ////////////////////////////////////////////////////////////////////////////// | 323 ////////////////////////////////////////////////////////////////////////////// |
333 | 324 |
334 DEF_GM(return SkNEW(ImageFilterFastBoundGM);) | 325 DEF_GM(return SkNEW(ImageFilterFastBoundGM);) |
335 | 326 |
336 } | 327 } |
OLD | NEW |