| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |