Index: src/core/SkCanvas.cpp |
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp |
index bc354ab3c34d86fa891c54aaa9cc8e50f5a15a99..e5ca9ce6c13f4edd40a2c2da396bdba99f6e35fa 100644 |
--- a/src/core/SkCanvas.cpp |
+++ b/src/core/SkCanvas.cpp |
@@ -114,6 +114,7 @@ |
// experimental for faster tiled drawing... |
//#define SK_ENABLE_CLIP_QUICKREJECT |
+ |
//#define SK_TRACE_SAVERESTORE |
#ifdef SK_TRACE_SAVERESTORE |
@@ -480,7 +481,7 @@ |
// Make rawBounds include all paint outsets except for those due to image filters. |
rawBounds = &apply_paint_to_bounds_sans_imagefilter(*fPaint, *rawBounds, &storage); |
} |
- (void)canvas->internalSaveLayer(SkCanvas::SaveLayerRec(rawBounds, &tmp), |
+ (void)canvas->internalSaveLayer(SkCanvas::SaveLayerRec(rawBounds, &tmp, 0), |
SkCanvas::kFullLayer_SaveLayerStrategy); |
fTempLayerForImageFilter = true; |
// we remove the imagefilter/xfermode inside doNext() |
@@ -1172,8 +1173,7 @@ |
return this->getSaveCount() - 1; |
} |
-static void draw_filter_into_device(SkBaseDevice* src, const SkImageFilter* filter, |
- SkBaseDevice* dst, const SkMatrix& ctm) { |
+static void draw_filter_into_device(SkBaseDevice* src, SkImageFilter* filter, SkBaseDevice* dst) { |
SkBitmap srcBM; |
@@ -1198,12 +1198,9 @@ |
SkCanvas c(dst); |
- SkAutoTUnref<SkImageFilter> localF(filter->newWithLocalMatrix(ctm)); |
SkPaint p; |
- p.setImageFilter(localF); |
- const SkScalar x = SkIntToScalar(src->getOrigin().x()); |
- const SkScalar y = SkIntToScalar(src->getOrigin().y()); |
- c.drawBitmap(srcBM, x, y, &p); |
+ p.setImageFilter(filter); |
+ c.drawBitmap(srcBM, 0, 0, &p); |
} |
void SkCanvas::internalSaveLayer(const SaveLayerRec& rec, SaveLayerStrategy strategy) { |
@@ -1271,10 +1268,11 @@ |
} |
device = newDev; |
} |
+ |
device->setOrigin(ir.fLeft, ir.fTop); |
- if (rec.fBackdrop) { |
- draw_filter_into_device(fMCRec->fTopLayer->fDevice, rec.fBackdrop, device, fMCRec->fMatrix); |
+ if (0) { |
+ draw_filter_into_device(fMCRec->fTopLayer->fDevice, nullptr, device); |
} |
DeviceCM* layer = |