#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
This commit is contained in:
reed@google.com 2012-10-15 13:45:40 +00:00
parent 4200dfe9c1
commit 04685d29b1

View File

@ -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