| 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 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 | 684 |
| 685 EXPECT_COPY_ON_WRITE(clear(testColor)) | 685 EXPECT_COPY_ON_WRITE(clear(testColor)) |
| 686 EXPECT_COPY_ON_WRITE(drawPaint(testPaint)) | 686 EXPECT_COPY_ON_WRITE(drawPaint(testPaint)) |
| 687 EXPECT_COPY_ON_WRITE(drawPoints(SkCanvas::kPoints_PointMode, testPointCount,
testPoints, \ | 687 EXPECT_COPY_ON_WRITE(drawPoints(SkCanvas::kPoints_PointMode, testPointCount,
testPoints, \ |
| 688 testPaint)) | 688 testPaint)) |
| 689 EXPECT_COPY_ON_WRITE(drawOval(testRect, testPaint)) | 689 EXPECT_COPY_ON_WRITE(drawOval(testRect, testPaint)) |
| 690 EXPECT_COPY_ON_WRITE(drawRect(testRect, testPaint)) | 690 EXPECT_COPY_ON_WRITE(drawRect(testRect, testPaint)) |
| 691 EXPECT_COPY_ON_WRITE(drawRRect(testRRect, testPaint)) | 691 EXPECT_COPY_ON_WRITE(drawRRect(testRRect, testPaint)) |
| 692 EXPECT_COPY_ON_WRITE(drawPath(testPath, testPaint)) | 692 EXPECT_COPY_ON_WRITE(drawPath(testPath, testPaint)) |
| 693 EXPECT_COPY_ON_WRITE(drawBitmap(testBitmap, 0, 0)) | 693 EXPECT_COPY_ON_WRITE(drawBitmap(testBitmap, 0, 0)) |
| 694 EXPECT_COPY_ON_WRITE(drawBitmapRect(testBitmap, testRect)) | 694 EXPECT_COPY_ON_WRITE(drawBitmapRect(testBitmap, NULL, testRect)) |
| 695 EXPECT_COPY_ON_WRITE(drawBitmapNine(testBitmap, testIRect, testRect, NULL)) | 695 EXPECT_COPY_ON_WRITE(drawBitmapNine(testBitmap, testIRect, testRect, NULL)) |
| 696 EXPECT_COPY_ON_WRITE(drawSprite(testBitmap, 0, 0, NULL)) | 696 EXPECT_COPY_ON_WRITE(drawSprite(testBitmap, 0, 0, NULL)) |
| 697 EXPECT_COPY_ON_WRITE(drawText(testText.c_str(), testText.size(), 0, 1, testP
aint)) | 697 EXPECT_COPY_ON_WRITE(drawText(testText.c_str(), testText.size(), 0, 1, testP
aint)) |
| 698 EXPECT_COPY_ON_WRITE(drawPosText(testText.c_str(), testText.size(), testPoin
ts2, \ | 698 EXPECT_COPY_ON_WRITE(drawPosText(testText.c_str(), testText.size(), testPoin
ts2, \ |
| 699 testPaint)) | 699 testPaint)) |
| 700 EXPECT_COPY_ON_WRITE(drawTextOnPath(testText.c_str(), testText.size(), testP
ath, NULL, \ | 700 EXPECT_COPY_ON_WRITE(drawTextOnPath(testText.c_str(), testText.size(), testP
ath, NULL, \ |
| 701 testPaint)) | 701 testPaint)) |
| 702 } | 702 } |
| 703 | 703 |
| 704 static void TestSurfaceWritableAfterSnapshotRelease(skiatest::Reporter* reporter
, | 704 static void TestSurfaceWritableAfterSnapshotRelease(skiatest::Reporter* reporter
, |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 982 // We expect the ref'd image to see the new color, but cpy'd one should stil
l see the old color | 982 // We expect the ref'd image to see the new color, but cpy'd one should stil
l see the old color |
| 983 test_image_color(reporter, refImg, expected1); | 983 test_image_color(reporter, refImg, expected1); |
| 984 test_image_color(reporter, cpyImg, expected0); | 984 test_image_color(reporter, cpyImg, expected0); |
| 985 | 985 |
| 986 // Now exercise the release proc | 986 // Now exercise the release proc |
| 987 REPORTER_ASSERT(reporter, !releaseCtx.fIsReleased); | 987 REPORTER_ASSERT(reporter, !releaseCtx.fIsReleased); |
| 988 refImg.reset(NULL); // force a release of the image | 988 refImg.reset(NULL); // force a release of the image |
| 989 REPORTER_ASSERT(reporter, releaseCtx.fIsReleased); | 989 REPORTER_ASSERT(reporter, releaseCtx.fIsReleased); |
| 990 } | 990 } |
| 991 #endif | 991 #endif |
| OLD | NEW |