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

Unified Diff: src/effects/SkColorFilterImageFilter.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/SkBlurMaskFilter.cpp ('k') | src/effects/SkColorFilters.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkColorFilterImageFilter.cpp
diff --git a/src/effects/SkColorFilterImageFilter.cpp b/src/effects/SkColorFilterImageFilter.cpp
index 2c3706769fa400a91e8ffdf3aa9a1e03c097e2e1..2a7cc3107a5fa2b6c9836b7cff56222aaced4b25 100755
--- a/src/effects/SkColorFilterImageFilter.cpp
+++ b/src/effects/SkColorFilterImageFilter.cpp
@@ -83,14 +83,20 @@ SkColorFilterImageFilter::SkColorFilterImageFilter(SkColorFilter* cf,
SkSafeRef(cf);
}
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
SkColorFilterImageFilter::SkColorFilterImageFilter(SkReadBuffer& buffer)
: INHERITED(1, buffer) {
fColorFilter = buffer.readColorFilter();
}
+#endif
+
+SkFlattenable* SkColorFilterImageFilter::CreateProc(SkReadBuffer& buffer) {
+ SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
+ return Create(buffer.readColorFilter(), common.getInput(0), &common.cropRect());
+}
void SkColorFilterImageFilter::flatten(SkWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
-
buffer.writeFlattenable(fColorFilter);
}
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | src/effects/SkColorFilters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698