From 04685d29b1c5280717dfcd63c3cbe1ee84fa6923 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Mon, 15 Oct 2012 13:45:40 +0000 Subject: #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 --- src/core/SkBitmap.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp index 2b84c098af..61a4c8f7a5 100644 --- a/src/core/SkBitmap.cpp +++ b/src/core/SkBitmap.cpp @@ -828,8 +828,10 @@ 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()); +#ifndef SK_DISABLE_EXTRACTSUBSET_OPAQUE_FIX + dst.setIsOpaque(this->isOpaque()); +#endif if (fPixelRef) { // share the pixelref with a custom offset -- cgit v1.2.3