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

Side by Side Diff: tests/SurfaceTest.cpp

Issue 1240753003: Revert[2] 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 | « tests/PictureTest.cpp ('k') | no next file » | 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 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
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, NULL, testRect)) 694 EXPECT_COPY_ON_WRITE(drawBitmapRect(testBitmap, 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
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
OLDNEW
« no previous file with comments | « tests/PictureTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698