#define SK_DISABLE_EXTRACTSUBSET_OPAQUE_FIX to keep old, slow, non-opaque behavior
in SkBitmap::extractSubset.
This will allow chrome to keep this behavior until we can fix the callers in
PNG and WEBP image decoders, that are incorrectly marking partially-loaded images
as opaque (which they aren't, since they have undecoded pixels, which need to be
transparent).
git-svn-id: http://skia.googlecode.com/svn/trunk@5949 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index 2b84c09..61a4c8f 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -828,8 +828,10 @@
SkBitmap dst;
dst.setConfig(this->config(), r.width(), r.height(), this->rowBytes());
- dst.setIsOpaque(this->isOpaque());
dst.setIsVolatile(this->isVolatile());
+#ifndef SK_DISABLE_EXTRACTSUBSET_OPAQUE_FIX
+ dst.setIsOpaque(this->isOpaque());
+#endif
if (fPixelRef) {
// share the pixelref with a custom offset