diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-10-15 13:45:40 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-10-15 13:45:40 +0000 |
commit | 04685d29b1c5280717dfcd63c3cbe1ee84fa6923 (patch) | |
tree | b9e58a064520397b9d36911572772859a38041e9 | |
parent | 4200dfe9c1a2c0e99a7155a63fbffb01e9d1fd28 (diff) |
#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
-rw-r--r-- | src/core/SkBitmap.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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 |