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

Unified Diff: src/effects/SkTestImageFilters.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/SkTableMaskFilter.cpp ('k') | src/effects/SkTileImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkTestImageFilters.cpp
diff --git a/src/effects/SkTestImageFilters.cpp b/src/effects/SkTestImageFilters.cpp
index da88316654ab3d58b7776bb12307cc5e406ba5e2..a414c924f30607ebdf73e41cb794075ddfa9f9f0 100755
--- a/src/effects/SkTestImageFilters.cpp
+++ b/src/effects/SkTestImageFilters.cpp
@@ -71,14 +71,20 @@ bool SkDownSampleImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src,
return true;
}
+SkFlattenable* SkDownSampleImageFilter::CreateProc(SkReadBuffer& buffer) {
+ SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
+ return Create(buffer.readScalar(), common.getInput(0));
+}
+
void SkDownSampleImageFilter::flatten(SkWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
-
buffer.writeScalar(fScale);
}
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
SkDownSampleImageFilter::SkDownSampleImageFilter(SkReadBuffer& buffer)
: INHERITED(1, buffer) {
fScale = buffer.readScalar();
buffer.validate(SkScalarIsFinite(fScale));
}
+#endif
« no previous file with comments | « src/effects/SkTableMaskFilter.cpp ('k') | src/effects/SkTileImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698