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

Unified Diff: tests/ImageTest.cpp

Issue 2218223002: update Image_MakeFromRasterBitmap to check uniqueIDs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ImageTest.cpp
diff --git a/tests/ImageTest.cpp b/tests/ImageTest.cpp
index 14b55a421a371bfc7952927c4ede07c6fac546a3..ca4788c4491f9c557355aea5e3a7aff4c41e7447 100644
--- a/tests/ImageTest.cpp
+++ b/tests/ImageTest.cpp
@@ -211,6 +211,7 @@ DEF_TEST(Image_MakeFromRasterBitmap, reporter) {
REPORTER_ASSERT(reporter, img->peekPixels(&pm));
const bool sameMutable = pm.addr32(0, 0) == bm.getAddr32(0, 0);
REPORTER_ASSERT(reporter, rec.fExpectSameAsMutable == sameMutable);
+ REPORTER_ASSERT(reporter, (bm.getGenerationID() == img->uniqueID()) == sameMutable);
bm.notifyPixelsChanged(); // force a new generation ID
@@ -219,6 +220,7 @@ DEF_TEST(Image_MakeFromRasterBitmap, reporter) {
REPORTER_ASSERT(reporter, img->peekPixels(&pm));
const bool sameImmutable = pm.addr32(0, 0) == bm.getAddr32(0, 0);
REPORTER_ASSERT(reporter, rec.fExpectSameAsImmutable == sameImmutable);
+ REPORTER_ASSERT(reporter, (bm.getGenerationID() == img->uniqueID()) == sameImmutable);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698