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

Side by Side Diff: gm/bleed.cpp

Issue 23352003: Create new target to hold gpu test code, enable direct testing of GrEffects in GM. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Rob's comments Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « gm/beziereffects.cpp ('k') | gm/gm.h » ('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 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
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(); )
OLDNEW
« no previous file with comments | « gm/beziereffects.cpp ('k') | gm/gm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698