Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Unified Diff: src/core/SkCanvas.cpp

Issue 1618843002: Hide SkCanvas::{set,get}DrawFilter (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index e577b21932649871180b61ab81b03c4762977ef9..d59171f19c17dc0bbe4132f5a114cd7ddb6bf12a 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -444,7 +444,11 @@ public:
bool skipLayerForImageFilter = false,
const SkRect* rawBounds = nullptr) : fOrigPaint(paint) {
fCanvas = canvas;
+#ifdef SK_SUPPORT_LEGACY_DRAWFLTER
fFilter = canvas->getDrawFilter();
+#else
+ fFilter = nullptr;
+#endif
fPaint = &fOrigPaint;
fSaveCount = canvas->getSaveCount();
fTempLayerForImageFilter = false;
@@ -778,6 +782,7 @@ SkCanvas::~SkCanvas() {
dec_canvas();
}
+#ifdef SK_SUPPORT_LEGACY_DRAWFLTER
SkDrawFilter* SkCanvas::getDrawFilter() const {
return fMCRec->fFilter;
}
@@ -787,6 +792,7 @@ SkDrawFilter* SkCanvas::setDrawFilter(SkDrawFilter* filter) {
SkRefCnt_SafeAssign(fMCRec->fFilter, filter);
return filter;
}
+#endif
SkMetaData& SkCanvas::getMetaData() {
// metadata users are rare, so we lazily allocate it. If that changes we

Powered by Google App Engine
This is Rietveld 408576698