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

Unified Diff: gm/imagefiltersgraph.cpp

Issue 768183002: Revert of Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 | « gm/imagefiltersbase.cpp ('k') | include/core/SkColorFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imagefiltersgraph.cpp
diff --git a/gm/imagefiltersgraph.cpp b/gm/imagefiltersgraph.cpp
index 8469a43b59e824d52d02d29a377c9edb59ed3149..8af268e5681a9777e77fc6cf1a4f5803b07bf80c 100644
--- a/gm/imagefiltersgraph.cpp
+++ b/gm/imagefiltersgraph.cpp
@@ -29,7 +29,11 @@
public:
Registrar() {
SkFlattenable::Register("SimpleOffsetFilter",
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
+ SimpleOffsetFilter::DeepCreateProc,
+#else
SimpleOffsetFilter::CreateProc,
+#endif
SimpleOffsetFilter::GetFlattenableType());
}
};
@@ -65,6 +69,14 @@
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SimpleOffsetFilter);
protected:
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
+ explicit SimpleOffsetFilter(SkReadBuffer& buffer)
+ : SkImageFilter(1, buffer) {
+ fDX = buffer.readScalar();
+ fDY = buffer.readScalar();
+ }
+#endif
+
virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE {
this->INHERITED::flatten(buffer);
buffer.writeScalar(fDX);
« no previous file with comments | « gm/imagefiltersbase.cpp ('k') | include/core/SkColorFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698