Index: src/core/SkCanvas.cpp |
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp |
index bd75f7dbdea0f37fc3351bbe180ebd48d40e2277..0888a01fa459615322717b5896d68bed5e0dc229 100644 |
--- a/src/core/SkCanvas.cpp |
+++ b/src/core/SkCanvas.cpp |
@@ -348,7 +348,7 @@ |
SkPaint tmp; |
tmp.setImageFilter(fOrigPaint.getImageFilter()); |
(void)canvas->internalSaveLayer(bounds, &tmp, |
- SkCanvas::kARGB_ClipLayer_SaveFlag, true, false); |
+ SkCanvas::kARGB_ClipLayer_SaveFlag, true); |
// we'll clear the imageFilter for the actual draws in next(), so |
// it will only be applied during the restore(). |
fDoClearImageFilter = true; |
@@ -806,12 +806,7 @@ |
return saveCount; |
} |
-void SkCanvas::onSave(SaveFlags) { |
- // Do nothing. Subclasses may do something. |
-} |
- |
int SkCanvas::save(SaveFlags flags) { |
- this->onSave(flags); |
// call shared impl |
return this->internalSave(flags); |
} |
@@ -868,16 +863,9 @@ |
return true; |
} |
-bool SkCanvas::onSaveLayer(const SkRect*, const SkPaint*, SaveFlags) { |
- // Do nothing. Subclasses may do something. |
- return true; |
-} |
- |
int SkCanvas::saveLayer(const SkRect* bounds, const SkPaint* paint, |
SaveFlags flags) { |
- // Overriding classes may return false to signal that we don't need to create a layer. |
- bool skipLayer = !this->onSaveLayer(bounds, paint, flags); |
- return this->internalSaveLayer(bounds, paint, flags, false, skipLayer); |
+ return this->internalSaveLayer(bounds, paint, flags, false); |
} |
static SkBaseDevice* createCompatibleDevice(SkCanvas* canvas, |
@@ -887,7 +875,7 @@ |
} |
int SkCanvas::internalSaveLayer(const SkRect* bounds, const SkPaint* paint, |
- SaveFlags flags, bool justForImageFilter, bool skipLayer) { |
+ SaveFlags flags, bool justForImageFilter) { |
#ifndef SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG |
flags = (SaveFlags)(flags | kClipToLayer_SaveFlag); |
#endif |
@@ -902,11 +890,6 @@ |
if (!this->clipRectBounds(bounds, flags, &ir, paint ? paint->getImageFilter() : NULL)) { |
return count; |
} |
- |
- // FIXME: do onSaveLayer() overriders returning false really care about the clipRectBounds() |
- // call above? |
- if (skipLayer) |
- return count; |
// Kill the imagefilter if our device doesn't allow it |
SkLazyPaint lazyP; |
@@ -960,14 +943,9 @@ |
} |
} |
-void SkCanvas::onRestore() { |
- // Do nothing. Subclasses may do something. |
-} |
- |
void SkCanvas::restore() { |
// check for underflow |
if (fMCStack.count() > 1) { |
- this->onRestore(); |
this->internalRestore(); |
} |
} |