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

Side by Side Diff: gm/bitmaprect.cpp

Issue 797963002: pass dst-rect through from drawBitmapRect for better precision (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | include/core/SkDraw.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 /* 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 "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkGradientShader.h" 10 #include "SkGradientShader.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 canvas->scale(0.9f, 0.9f); 268 canvas->scale(0.9f, 0.9f);
269 269
270 // the drawRect shows the same problem as clipRect(r) followed by drawco lor(red) 270 // the drawRect shows the same problem as clipRect(r) followed by drawco lor(red)
271 canvas->drawRect(r, paint); 271 canvas->drawRect(r, paint);
272 canvas->drawBitmapRect(fBM, NULL, r, NULL); 272 canvas->drawBitmapRect(fBM, NULL, r, NULL);
273 } 273 }
274 274
275 private: 275 private:
276 typedef skiagm::GM INHERITED; 276 typedef skiagm::GM INHERITED;
277 }; 277 };
278 DEF_GM( return new BitmapRectRounding; )
278 279
279 ////////////////////////////////////////////////////////////////////////////// 280 //////////////////////////////////////////////////////////////////////////////
280 281
281 static skiagm::GM* MyFactory0(void*) { return new DrawBitmapRect2(false); } 282 static skiagm::GM* MyFactory0(void*) { return new DrawBitmapRect2(false); }
282 static skiagm::GM* MyFactory1(void*) { return new DrawBitmapRect2(true); } 283 static skiagm::GM* MyFactory1(void*) { return new DrawBitmapRect2(true); }
283 284
284 static skiagm::GM* MyFactory2(void*) { return new DrawBitmapRect3(); } 285 static skiagm::GM* MyFactory2(void*) { return new DrawBitmapRect3(); }
285 286
286 #ifndef SK_BUILD_FOR_ANDROID 287 #ifndef SK_BUILD_FOR_ANDROID
287 static skiagm::GM* MyFactory3(void*) { return new DrawBitmapRect4(false); } 288 static skiagm::GM* MyFactory3(void*) { return new DrawBitmapRect4(false); }
288 static skiagm::GM* MyFactory4(void*) { return new DrawBitmapRect4(true); } 289 static skiagm::GM* MyFactory4(void*) { return new DrawBitmapRect4(true); }
289 #endif 290 #endif
290 291
291 static skiagm::GMRegistry reg0(MyFactory0); 292 static skiagm::GMRegistry reg0(MyFactory0);
292 static skiagm::GMRegistry reg1(MyFactory1); 293 static skiagm::GMRegistry reg1(MyFactory1);
293 294
294 static skiagm::GMRegistry reg2(MyFactory2); 295 static skiagm::GMRegistry reg2(MyFactory2);
295 296
296 #ifndef SK_BUILD_FOR_ANDROID 297 #ifndef SK_BUILD_FOR_ANDROID
297 static skiagm::GMRegistry reg3(MyFactory3); 298 static skiagm::GMRegistry reg3(MyFactory3);
298 static skiagm::GMRegistry reg4(MyFactory4); 299 static skiagm::GMRegistry reg4(MyFactory4);
299 #endif 300 #endif
300 301
301 DEF_GM( return new BitmapRectRounding; )
OLDNEW
« no previous file with comments | « no previous file | include/core/SkDraw.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698