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

Side by Side Diff: gm/tilemodes.cpp

Issue 22415004: Regenerate bitmaps before each draw in tilemodes_npot GM (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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 | « no previous file | no next file » | 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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "gm.h" 8 #include "gm.h"
9 #include "SkPath.h" 9 #include "SkPath.h"
10 #include "SkRegion.h" 10 #include "SkRegion.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 124
125 y += SkIntToScalar(16); 125 y += SkIntToScalar(16);
126 126
127 for (size_t i = 0; i < SK_ARRAY_COUNT(gConfigs); i++) { 127 for (size_t i = 0; i < SK_ARRAY_COUNT(gConfigs); i++) {
128 for (size_t j = 0; j < SK_ARRAY_COUNT(gFilters); j++) { 128 for (size_t j = 0; j < SK_ARRAY_COUNT(gFilters); j++) {
129 x = SkIntToScalar(10); 129 x = SkIntToScalar(10);
130 for (size_t kx = 0; kx < SK_ARRAY_COUNT(gModes); kx++) { 130 for (size_t kx = 0; kx < SK_ARRAY_COUNT(gModes); kx++) {
131 for (size_t ky = 0; ky < SK_ARRAY_COUNT(gModes); ky++) { 131 for (size_t ky = 0; ky < SK_ARRAY_COUNT(gModes); ky++) {
132 SkPaint paint; 132 SkPaint paint;
133 #if 1 // Temporary change to regen bitmap before each draw. This may help tracki ng down an issue
134 // on SGX where resizing NPOT textures to POT textures exhibits a driver b ug.
135 if (!fPowerOfTwoSize) {
136 makebm(&fTexture[i], gConfigs[i], size, size);
137 }
138 #endif
133 setup(&paint, fTexture[i], gFilters[j], gModes[kx], gMod es[ky]); 139 setup(&paint, fTexture[i], gFilters[j], gModes[kx], gMod es[ky]);
134 paint.setDither(true); 140 paint.setDither(true);
135 141
136 canvas->save(); 142 canvas->save();
137 canvas->translate(x, y); 143 canvas->translate(x, y);
138 canvas->drawRect(r, paint); 144 canvas->drawRect(r, paint);
139 canvas->restore(); 145 canvas->restore();
140 146
141 x += r.width() * 4 / 3; 147 x += r.width() * 4 / 3;
142 } 148 }
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 private: 266 private:
261 typedef skiagm::GM INHERITED; 267 typedef skiagm::GM INHERITED;
262 }; 268 };
263 269
264 ////////////////////////////////////////////////////////////////////////////// 270 //////////////////////////////////////////////////////////////////////////////
265 271
266 DEF_GM( return new TilingGM(true); ) 272 DEF_GM( return new TilingGM(true); )
267 DEF_GM( return new TilingGM(false); ) 273 DEF_GM( return new TilingGM(false); )
268 DEF_GM( return new Tiling2GM(make_bm, "bitmap"); ) 274 DEF_GM( return new Tiling2GM(make_bm, "bitmap"); )
269 DEF_GM( return new Tiling2GM(make_grad, "gradient"); ) 275 DEF_GM( return new Tiling2GM(make_grad, "gradient"); )
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698