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

Unified Diff: src/effects/SkLumaColorFilter.cpp

Issue 395603002: Simplify flattening to just write enough to call the factory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 4 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
« no previous file with comments | « src/effects/SkLightingImageFilter.cpp ('k') | src/effects/SkMagnifierImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkLumaColorFilter.cpp
diff --git a/src/effects/SkLumaColorFilter.cpp b/src/effects/SkLumaColorFilter.cpp
index d33e5e8d78ea0087c2fc9ded6656b797afa0ddde..26621bb02e898776bfb484c693719f16dd143408 100644
--- a/src/effects/SkLumaColorFilter.cpp
+++ b/src/effects/SkLumaColorFilter.cpp
@@ -41,17 +41,18 @@ SkColorFilter* SkLumaColorFilter::Create() {
return SkNEW(SkLumaColorFilter);
}
-SkLumaColorFilter::SkLumaColorFilter()
- : INHERITED() {
-}
+SkLumaColorFilter::SkLumaColorFilter() : INHERITED() {}
-SkLumaColorFilter::SkLumaColorFilter(SkReadBuffer& buffer)
- : INHERITED(buffer) {
-}
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
+SkLumaColorFilter::SkLumaColorFilter(SkReadBuffer& buffer) : INHERITED(buffer) {}
+#endif
-void SkLumaColorFilter::flatten(SkWriteBuffer&) const {
+SkFlattenable* SkLumaColorFilter::CreateProc(SkReadBuffer&) {
+ return SkNEW(SkLumaColorFilter);
}
+void SkLumaColorFilter::flatten(SkWriteBuffer&) const {}
+
#ifndef SK_IGNORE_TO_STRING
void SkLumaColorFilter::toString(SkString* str) const {
str->append("SkLumaColorFilter ");
« no previous file with comments | « src/effects/SkLightingImageFilter.cpp ('k') | src/effects/SkMagnifierImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698