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

Side by Side Diff: bench/GameBench.cpp

Issue 23264014: Bleed cleanup (remove nocolorbleed GM & enable bleed in game bench) (Closed) Base URL: http://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 | gm/nocolorbleed.cpp » ('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 2012 Google Inc. 2 * Copyright 2012 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 "SkBenchmark.h" 8 #include "SkBenchmark.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkPaint.h" 10 #include "SkPaint.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 SkPoint uvs[4] = { 200 SkPoint uvs[4] = {
201 { SkIntToScalar(src.fLeft), SkIntToScalar(src.fBottom) }, 201 { SkIntToScalar(src.fLeft), SkIntToScalar(src.fBottom) },
202 { SkIntToScalar(src.fLeft), SkIntToScalar(src.fTop) }, 202 { SkIntToScalar(src.fLeft), SkIntToScalar(src.fTop) },
203 { SkIntToScalar(src.fRight), SkIntToScalar(src.fTop) }, 203 { SkIntToScalar(src.fRight), SkIntToScalar(src.fTop) },
204 { SkIntToScalar(src.fRight), SkIntToScalar(src.fBottom) }, 204 { SkIntToScalar(src.fRight), SkIntToScalar(src.fBottom) },
205 }; 205 };
206 canvas->drawVertices(SkCanvas::kTriangles_VertexMode, 206 canvas->drawVertices(SkCanvas::kTriangles_VertexMode,
207 4, verts, uvs, NULL, NULL, 207 4, verts, uvs, NULL, NULL,
208 indices, 6, p2); 208 indices, 6, p2);
209 } else { 209 } else {
210 canvas->drawBitmapRect(fAtlas, &src, dst, &p); 210 canvas->drawBitmapRect(fAtlas, &src, dst, &p,
211 SkCanvas::kBleed_DrawBitmapRectFlag);
211 } 212 }
212 } else { 213 } else {
213 canvas->drawBitmapRect(fCheckerboard, NULL, dst, &p); 214 canvas->drawBitmapRect(fCheckerboard, NULL, dst, &p);
214 } 215 }
215 } 216 }
216 } 217 }
217 218
218 private: 219 private:
219 static const int kCheckerboardWidth = 64; 220 static const int kCheckerboardWidth = 64;
220 static const int kCheckerboardHeight = 128; 221 static const int kCheckerboardHeight = 128;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kTranslate_Type, 339 DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kTranslate_Type,
339 GameBench::kFull_Clear, true)); ) 340 GameBench::kFull_Clear, true)); )
340 DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kRotate_Type, 341 DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kRotate_Type,
341 GameBench::kFull_Clear)); ) 342 GameBench::kFull_Clear)); )
342 343
343 // Atlased 344 // Atlased
344 DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kTranslate_Type, 345 DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kTranslate_Type,
345 GameBench::kFull_Clear, false, true) ); ) 346 GameBench::kFull_Clear, false, true) ); )
346 DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kTranslate_Type, 347 DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kTranslate_Type,
347 GameBench::kFull_Clear, false, true, true)); ) 348 GameBench::kFull_Clear, false, true, true)); )
OLDNEW
« no previous file with comments | « no previous file | gm/nocolorbleed.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698