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

Unified Diff: src/core/SkFlattenable.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: simplify xfermodes, fix SkLayerDrawLooper 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
Index: src/core/SkFlattenable.cpp
diff --git a/src/core/SkFlattenable.cpp b/src/core/SkFlattenable.cpp
index 410fe0d974959c4ab36ca9193cb26509a7559449..07c77654890c20e2d75249e27e5c1138fe1792ec 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.isVersionLT(SkReadBuffer::kFlattenCreateProc_Version);
}
+#endif
+
+void SkFlattenable::flatten(SkWriteBuffer&) const {}
///////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698