Index: src/core/SkFlattenable.cpp |
diff --git a/src/core/SkFlattenable.cpp b/src/core/SkFlattenable.cpp |
index 410fe0d974959c4ab36ca9193cb26509a7559449..034c7a7be0f193560dcabf8e4daf7b560a645859 100644 |
--- a/src/core/SkFlattenable.cpp |
+++ b/src/core/SkFlattenable.cpp |
@@ -1,22 +1,23 @@ |
- |
/* |
* Copyright 2011 Google Inc. |
* |
* Use of this source code is governed by a BSD-style license that can be |
* found in the LICENSE file. |
*/ |
+ |
#include "SkFlattenable.h" |
#include "SkPtrRecorder.h" |
+#include "SkReadBuffer.h" |
/////////////////////////////////////////////////////////////////////////////// |
-void SkFlattenable::flatten(SkWriteBuffer&) const |
-{ |
- /* we don't write anything at the moment, but this allows our subclasses |
- to not know that, since we want them to always call INHERITED::flatten() |
- in their code. |
- */ |
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING |
+bool SkFlattenable::NeedsDeepUnflatten(const SkReadBuffer& buffer) { |
+ return buffer.pictureVersion() < kNewFlattenVersion; |
} |
+#endif |
+ |
+void SkFlattenable::flatten(SkWriteBuffer&) const {} |
/////////////////////////////////////////////////////////////////////////////// |