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

Side by Side Diff: tests/DrawBitmapRectTest.cpp

Issue 1230823007: Revert of guard to remove DrawBitmapRectFlags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « src/utils/debugger/SkDrawCommand.cpp ('k') | tests/PictureTest.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 2011 Google Inc. 2 * Copyright 2011 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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkData.h" 10 #include "SkData.h"
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 SkBitmap src, dst; 292 SkBitmap src, dst;
293 293
294 create(&src, 0xFFFFFFFF); 294 create(&src, 0xFFFFFFFF);
295 create(&dst, 0); 295 create(&dst, 0);
296 296
297 SkCanvas canvas(dst); 297 SkCanvas canvas(dst);
298 298
299 SkIRect srcR = { gWidth, 0, gWidth + 16, 16 }; 299 SkIRect srcR = { gWidth, 0, gWidth + 16, 16 };
300 SkRect dstR = { 0, 0, SkIntToScalar(16), SkIntToScalar(16) }; 300 SkRect dstR = { 0, 0, SkIntToScalar(16), SkIntToScalar(16) };
301 301
302 canvas.drawBitmapRect(src, srcR, dstR, NULL); 302 canvas.drawBitmapRect(src, &srcR, dstR, NULL);
303 303
304 // ensure that we draw nothing if srcR does not intersect the bitmap 304 // ensure that we draw nothing if srcR does not intersect the bitmap
305 REPORTER_ASSERT(reporter, check_for_all_zeros(dst)); 305 REPORTER_ASSERT(reporter, check_for_all_zeros(dst));
306 306
307 test_nan_antihair(); 307 test_nan_antihair();
308 test_giantrepeat_crbug118018(reporter); 308 test_giantrepeat_crbug118018(reporter);
309 309
310 test_treatAsSprite(reporter); 310 test_treatAsSprite(reporter);
311 test_faulty_pixelref(reporter); 311 test_faulty_pixelref(reporter);
312 } 312 }
OLDNEW
« no previous file with comments | « src/utils/debugger/SkDrawCommand.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698