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

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: 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/core/SkFilterShader.cpp ('k') | src/core/SkImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkFlattenable.cpp
diff --git a/src/core/SkFlattenable.cpp b/src/core/SkFlattenable.cpp
index 410fe0d974959c4ab36ca9193cb26509a7559449..ae17be5a02bbec027c2dad5e9bf92de577a3cc70 100644
--- a/src/core/SkFlattenable.cpp
+++ b/src/core/SkFlattenable.cpp
@@ -1,22 +1,21 @@
-
/*
* 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
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « src/core/SkFilterShader.cpp ('k') | src/core/SkImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698