Revert r3219. r3219 was a revert of r3036. r3036 made extractSubset copy the opaque bit but was reverted because of a partally-loaded jpeg issue in WK which has since been fixed:
https://bugs.webkit.org/show_bug.cgi?id=78239
Related chrome bug: http://code.google.com/p/chromium/issues/detail?id=114107
git-svn-id: http://skia.googlecode.com/svn/trunk@5911 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/BitmapCopyTest.cpp b/tests/BitmapCopyTest.cpp
index 0366068..6cfb24b 100644
--- a/tests/BitmapCopyTest.cpp
+++ b/tests/BitmapCopyTest.cpp
@@ -316,11 +316,14 @@
SkBitmap subset;
SkIRect r;
r.set(1, 1, 2, 2);
+ bitmap.setIsOpaque(true);
bitmap.setIsVolatile(true);
if (bitmap.extractSubset(&subset, r)) {
REPORTER_ASSERT(reporter, subset.width() == 1);
REPORTER_ASSERT(reporter, subset.height() == 1);
REPORTER_ASSERT(reporter,
+ subset.isOpaque() == bitmap.isOpaque());
+ REPORTER_ASSERT(reporter,
subset.isVolatile() == true);
SkBitmap copy;
@@ -337,9 +340,12 @@
REPORTER_ASSERT(reporter,
(copy.getColorTable() != NULL) == hasCT);
}
+ bitmap.setIsOpaque(false);
bitmap.setIsVolatile(false);
if (bitmap.extractSubset(&subset, r)) {
REPORTER_ASSERT(reporter,
+ subset.isOpaque() == bitmap.isOpaque());
+ REPORTER_ASSERT(reporter,
subset.isVolatile() == false);
}
}