Index: src/core/SkCanvas.cpp |
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp |
index 11dc739f4c4dc6aa0509f8ba404a56fa246817e4..8426f090ec5949653ab516ffca3f7d33a317c338 100644 |
--- a/src/core/SkCanvas.cpp |
+++ b/src/core/SkCanvas.cpp |
@@ -918,10 +918,12 @@ void SkCanvas::internalSaveLayer(const SkRect* bounds, const SkPaint* paint, Sav |
} |
bool isOpaque = !SkToBool(flags & kHasAlphaLayer_SaveFlag); |
- if (isOpaque && paint) { |
+ SkPixelGeometry geo = fProps.pixelGeometry(); |
+ if (paint) { |
// TODO: perhaps add a query to filters so we might preserve opaqueness... |
if (paint->getImageFilter() || paint->getColorFilter()) { |
isOpaque = false; |
+ geo = kUnknown_SkPixelGeometry; |
} |
} |
SkImageInfo info = SkImageInfo::MakeN32(ir.width(), ir.height(), |
@@ -942,8 +944,7 @@ void SkCanvas::internalSaveLayer(const SkRect* bounds, const SkPaint* paint, Sav |
usage = SkBaseDevice::kPossible_TileUsage; |
} |
#endif |
- device = device->onCreateDevice(SkBaseDevice::CreateInfo(info, usage, fProps.pixelGeometry()), |
- paint); |
+ device = device->onCreateDevice(SkBaseDevice::CreateInfo(info, usage, geo), paint); |
if (NULL == device) { |
SkErrorInternals::SetError( kInternalError_SkError, |
"Unable to create device for layer."); |