From ae2964452bd679ca34b275911a9d0d01a35983b9 Mon Sep 17 00:00:00 2001 From: reed Date: Fri, 5 Aug 2016 13:19:01 -0700 Subject: [PATCH] update Image_MakeFromRasterBitmap to check uniqueIDs BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2218223002 Review-Url: https://codereview.chromium.org/2218223002 --- tests/ImageTest.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/ImageTest.cpp b/tests/ImageTest.cpp index 14b55a421a..ca4788c449 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); } }