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
This commit is contained in:
reed 2016-08-05 13:19:01 -07:00 committed by Commit bot
parent 300405a7a2
commit ae2964452b

View File

@ -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);
}
}