OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkBlurMaskFilter.h" | 10 #include "SkBlurMaskFilter.h" |
11 | 11 |
12 #if SK_SUPPORT_GPU | 12 #if SK_SUPPORT_GPU |
13 #include "GrContext.h" | 13 #include "GrContext.h" |
14 | 14 |
15 namespace skiagm { | 15 namespace skiagm { |
16 extern GrContext* GetGr(); | 16 extern GrContext* GetGr(); |
17 }; | 17 }; |
18 | |
19 void GrContext::setMaxTextureSizeOverride(int maxTextureSizeOverride) { | |
20 fMaxTextureSizeOverride = maxTextureSizeOverride; | |
21 } | |
22 #endif | 18 #endif |
23 | 19 |
24 // Create a black&white checked texture with a 1-pixel red ring | 20 // Create a black&white checked texture with a 1-pixel red ring |
25 // around the outside edge | 21 // around the outside edge |
26 static void make_red_ringed_bitmap(SkBitmap* result, int width, int height) { | 22 static void make_red_ringed_bitmap(SkBitmap* result, int width, int height) { |
27 SkASSERT(0 == width % 2 && 0 == width % 2); | 23 SkASSERT(0 == width % 2 && 0 == width % 2); |
28 | 24 |
29 result->setConfig(SkBitmap::kARGB_8888_Config, width, height); | 25 result->setConfig(SkBitmap::kARGB_8888_Config, width, height); |
30 result->allocPixels(); | 26 result->allocPixels(); |
31 SkAutoLockPixels lock(*result); | 27 SkAutoLockPixels lock(*result); |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 static const int kSmallTextureSize = 4; | 221 static const int kSmallTextureSize = 4; |
226 static const int kMaxTextureSize = 32; | 222 static const int kMaxTextureSize = 32; |
227 | 223 |
228 SkBitmap fBitmapSmall; | 224 SkBitmap fBitmapSmall; |
229 SkBitmap fBitmapBig; | 225 SkBitmap fBitmapBig; |
230 | 226 |
231 typedef GM INHERITED; | 227 typedef GM INHERITED; |
232 }; | 228 }; |
233 | 229 |
234 DEF_GM( return new BleedGM(); ) | 230 DEF_GM( return new BleedGM(); ) |
OLD | NEW |