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)) | |
464 EXPECT_COPY_ON_WRITE(drawText(testText.c_str(), testText.size(), 0, 1, testP
aint)) | 463 EXPECT_COPY_ON_WRITE(drawText(testText.c_str(), testText.size(), 0, 1, testP
aint)) |
465 EXPECT_COPY_ON_WRITE(drawPosText(testText.c_str(), testText.size(), testPoin
ts2, \ | 464 EXPECT_COPY_ON_WRITE(drawPosText(testText.c_str(), testText.size(), testPoin
ts2, \ |
466 testPaint)) | 465 testPaint)) |
467 EXPECT_COPY_ON_WRITE(drawTextOnPath(testText.c_str(), testText.size(), testP
ath, nullptr, \ | 466 EXPECT_COPY_ON_WRITE(drawTextOnPath(testText.c_str(), testText.size(), testP
ath, nullptr, \ |
468 testPaint)) | 467 testPaint)) |
469 } | 468 } |
470 DEF_TEST(SurfaceCopyOnWrite, reporter) { | 469 DEF_TEST(SurfaceCopyOnWrite, reporter) { |
471 SkAutoTUnref<SkSurface> surface(create_surface()); | 470 SkAutoTUnref<SkSurface> surface(create_surface()); |
472 test_copy_on_write(reporter, surface); | 471 test_copy_on_write(reporter, surface); |
473 } | 472 } |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 for (auto& test_func : { &test_no_canvas1, &test_no_canvas2 }) { | 654 for (auto& test_func : { &test_no_canvas1, &test_no_canvas2 }) { |
656 for (auto& mode : modes) { | 655 for (auto& mode : modes) { |
657 SkAutoTUnref<SkSurface> surface( | 656 SkAutoTUnref<SkSurface> surface( |
658 surface_func(context, kPremul_SkAlphaType, nullptr)); | 657 surface_func(context, kPremul_SkAlphaType, nullptr)); |
659 test_func(reporter, surface, mode); | 658 test_func(reporter, surface, mode); |
660 } | 659 } |
661 } | 660 } |
662 } | 661 } |
663 } | 662 } |
664 #endif | 663 #endif |
OLD | NEW |