Index: src/core/SkCanvas.cpp |
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp |
index 8849aba9151f5475dc1a6cec25cdde8e2370375e..34d6aaa0ab4ddbb9ae5f158a846d77636c326642 100644 |
--- a/src/core/SkCanvas.cpp |
+++ b/src/core/SkCanvas.cpp |
@@ -992,8 +992,6 @@ |
flags |= kClipToLayer_SaveFlag; |
#endif |
- SkImageFilter* imgf = paint ? paint->getImageFilter() : NULL; |
- |
// do this before we create the layer. We don't call the public save() since |
// that would invoke a possibly overridden virtual |
this->internalSave(); |
@@ -1001,7 +999,7 @@ |
fDeviceCMDirty = true; |
SkIRect ir; |
- if (!this->clipRectBounds(bounds, flags, &ir, imgf)) { |
+ if (!this->clipRectBounds(bounds, flags, &ir, paint ? paint->getImageFilter() : NULL)) { |
return; |
} |
@@ -1015,7 +1013,7 @@ |
SkPixelGeometry geo = fProps.pixelGeometry(); |
if (paint) { |
// TODO: perhaps add a query to filters so we might preserve opaqueness... |
- if (imgf || paint->getColorFilter()) { |
+ if (paint->getImageFilter() || paint->getColorFilter()) { |
isOpaque = false; |
geo = kUnknown_SkPixelGeometry; |
} |
@@ -1031,10 +1029,7 @@ |
bool forceSpriteOnRestore = false; |
{ |
- SkBaseDevice::TileUsage usage = SkBaseDevice::kNever_TileUsage; |
- if (imgf && imgf->mayDrawWithMatrix()) { |
- usage = SkBaseDevice::kPossible_TileUsage; |
- } |
+ const SkBaseDevice::TileUsage usage = SkBaseDevice::kNever_TileUsage; |
const SkBaseDevice::CreateInfo createInfo = SkBaseDevice::CreateInfo(info, usage, geo); |
SkBaseDevice* newDev = device->onCreateDevice(createInfo, paint); |
if (NULL == newDev) { |