OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkCanvas.h" | 8 #include "SkCanvas.h" |
9 #include "SkData.h" | 9 #include "SkData.h" |
10 #include "SkDevice.h" | 10 #include "SkDevice.h" |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 EXPECT_COPY_ON_WRITE(drawPaint(testPaint)) | 453 EXPECT_COPY_ON_WRITE(drawPaint(testPaint)) |
454 EXPECT_COPY_ON_WRITE(drawPoints(SkCanvas::kPoints_PointMode, testPointCount,
testPoints, \ | 454 EXPECT_COPY_ON_WRITE(drawPoints(SkCanvas::kPoints_PointMode, testPointCount,
testPoints, \ |
455 testPaint)) | 455 testPaint)) |
456 EXPECT_COPY_ON_WRITE(drawOval(testRect, testPaint)) | 456 EXPECT_COPY_ON_WRITE(drawOval(testRect, testPaint)) |
457 EXPECT_COPY_ON_WRITE(drawRect(testRect, testPaint)) | 457 EXPECT_COPY_ON_WRITE(drawRect(testRect, testPaint)) |
458 EXPECT_COPY_ON_WRITE(drawRRect(testRRect, testPaint)) | 458 EXPECT_COPY_ON_WRITE(drawRRect(testRRect, testPaint)) |
459 EXPECT_COPY_ON_WRITE(drawPath(testPath, testPaint)) | 459 EXPECT_COPY_ON_WRITE(drawPath(testPath, testPaint)) |
460 EXPECT_COPY_ON_WRITE(drawBitmap(testBitmap, 0, 0)) | 460 EXPECT_COPY_ON_WRITE(drawBitmap(testBitmap, 0, 0)) |
461 EXPECT_COPY_ON_WRITE(drawBitmapRect(testBitmap, testRect, nullptr)) | 461 EXPECT_COPY_ON_WRITE(drawBitmapRect(testBitmap, testRect, nullptr)) |
462 EXPECT_COPY_ON_WRITE(drawBitmapNine(testBitmap, testIRect, testRect, nullptr
)) | 462 EXPECT_COPY_ON_WRITE(drawBitmapNine(testBitmap, testIRect, testRect, nullptr
)) |
| 463 EXPECT_COPY_ON_WRITE(drawSprite(testBitmap, 0, 0, nullptr)) |
463 EXPECT_COPY_ON_WRITE(drawText(testText.c_str(), testText.size(), 0, 1, testP
aint)) | 464 EXPECT_COPY_ON_WRITE(drawText(testText.c_str(), testText.size(), 0, 1, testP
aint)) |
464 EXPECT_COPY_ON_WRITE(drawPosText(testText.c_str(), testText.size(), testPoin
ts2, \ | 465 EXPECT_COPY_ON_WRITE(drawPosText(testText.c_str(), testText.size(), testPoin
ts2, \ |
465 testPaint)) | 466 testPaint)) |
466 EXPECT_COPY_ON_WRITE(drawTextOnPath(testText.c_str(), testText.size(), testP
ath, nullptr, \ | 467 EXPECT_COPY_ON_WRITE(drawTextOnPath(testText.c_str(), testText.size(), testP
ath, nullptr, \ |
467 testPaint)) | 468 testPaint)) |
468 } | 469 } |
469 DEF_TEST(SurfaceCopyOnWrite, reporter) { | 470 DEF_TEST(SurfaceCopyOnWrite, reporter) { |
470 SkAutoTUnref<SkSurface> surface(create_surface()); | 471 SkAutoTUnref<SkSurface> surface(create_surface()); |
471 test_copy_on_write(reporter, surface); | 472 test_copy_on_write(reporter, surface); |
472 } | 473 } |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
654 for (auto& test_func : { &test_no_canvas1, &test_no_canvas2 }) { | 655 for (auto& test_func : { &test_no_canvas1, &test_no_canvas2 }) { |
655 for (auto& mode : modes) { | 656 for (auto& mode : modes) { |
656 SkAutoTUnref<SkSurface> surface( | 657 SkAutoTUnref<SkSurface> surface( |
657 surface_func(context, kPremul_SkAlphaType, nullptr)); | 658 surface_func(context, kPremul_SkAlphaType, nullptr)); |
658 test_func(reporter, surface, mode); | 659 test_func(reporter, surface, mode); |
659 } | 660 } |
660 } | 661 } |
661 } | 662 } |
662 } | 663 } |
663 #endif | 664 #endif |
OLD | NEW |