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
This commit is contained in:
parent
ba998f2ddc
commit
3768853169
@ -828,6 +828,7 @@ bool SkBitmap::extractSubset(SkBitmap* result, const SkIRect& subset) const {
|
||||
|
||||
SkBitmap dst;
|
||||
dst.setConfig(this->config(), r.width(), r.height(), this->rowBytes());
|
||||
dst.setIsOpaque(this->isOpaque());
|
||||
dst.setIsVolatile(this->isVolatile());
|
||||
|
||||
if (fPixelRef) {
|
||||
|
@ -316,10 +316,13 @@ static void TestBitmapCopy(skiatest::Reporter* reporter) {
|
||||
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);
|
||||
|
||||
@ -337,8 +340,11 @@ static void TestBitmapCopy(skiatest::Reporter* reporter) {
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user