| 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 | 10 |
| 11 #if SK_SUPPORT_GPU | 11 #if SK_SUPPORT_GPU |
| 12 #include "GrContext.h" | 12 #include "GrContext.h" |
| 13 | 13 |
| 14 namespace skiagm { | 14 namespace skiagm { |
| 15 extern GrContext* GetGr(); | 15 extern GrContext* GetGr(); |
| 16 }; | 16 }; |
| 17 | |
| 18 void GrContext::setMaxTextureSizeOverride(int maxTextureSizeOverride) { | |
| 19 fMaxTextureSizeOverride = maxTextureSizeOverride; | |
| 20 } | |
| 21 #endif | 17 #endif |
| 22 | 18 |
| 23 // Create a black&white checked texture with a 1-pixel red ring | 19 // Create a black&white checked texture with a 1-pixel red ring |
| 24 // around the outside edge | 20 // around the outside edge |
| 25 static void make_red_ringed_bitmap(SkBitmap* result, int width, int height) { | 21 static void make_red_ringed_bitmap(SkBitmap* result, int width, int height) { |
| 26 SkASSERT(0 == width % 2 && 0 == width % 2); | 22 SkASSERT(0 == width % 2 && 0 == width % 2); |
| 27 | 23 |
| 28 result->setConfig(SkBitmap::kARGB_8888_Config, width, height); | 24 result->setConfig(SkBitmap::kARGB_8888_Config, width, height); |
| 29 result->allocPixels(); | 25 result->allocPixels(); |
| 30 SkAutoLockPixels lock(*result); | 26 SkAutoLockPixels lock(*result); |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 static const int kSmallTextureSize = 4; | 195 static const int kSmallTextureSize = 4; |
| 200 static const int kMaxTextureSize = 32; | 196 static const int kMaxTextureSize = 32; |
| 201 | 197 |
| 202 SkBitmap fBitmapSmall; | 198 SkBitmap fBitmapSmall; |
| 203 SkBitmap fBitmapBig; | 199 SkBitmap fBitmapBig; |
| 204 | 200 |
| 205 typedef GM INHERITED; | 201 typedef GM INHERITED; |
| 206 }; | 202 }; |
| 207 | 203 |
| 208 DEF_GM( return new BleedGM(); ) | 204 DEF_GM( return new BleedGM(); ) |
| OLD | NEW |