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

Unified Diff: include/core/SkWriteBuffer.h

Issue 1858323002: Enable flattening/unflattening with custom unflatten procs (Closed) Base URL: https://skia.googlesource.com/skia.git@flattenable
Patch Set: Fix test Created 4 years, 8 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 | « include/core/SkFlattenable.h ('k') | src/core/SkFlattenableSerialization.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkWriteBuffer.h
diff --git a/include/core/SkWriteBuffer.h b/include/core/SkWriteBuffer.h
index 306a3e37a9f27cc6a36ef8642bdb4961656a3629..c931ad3fd294bf784f7c5939e3a8d755b9ba6b50 100644
--- a/include/core/SkWriteBuffer.h
+++ b/include/core/SkWriteBuffer.h
@@ -16,6 +16,7 @@
#include "SkPixelSerializer.h"
#include "SkRefCnt.h"
#include "SkWriter32.h"
+#include "../private/SkTHash.h"
class SkBitmap;
class SkBitmapHeap;
@@ -27,7 +28,6 @@ class SkWriteBuffer {
public:
enum Flags {
kCrossProcess_Flag = 1 << 0,
- kValidation_Flag = 1 << 1,
};
SkWriteBuffer(uint32_t flags = 0);
@@ -35,7 +35,7 @@ public:
~SkWriteBuffer();
bool isCrossProcess() const {
- return this->isValidating() || SkToBool(fFlags & kCrossProcess_Flag);
+ return SkToBool(fFlags & kCrossProcess_Flag);
}
SkWriter32* getWriter32() { return &fWriter; }
@@ -108,8 +108,6 @@ public:
SkPixelSerializer* getPixelSerializer() const { return fPixelSerializer; }
private:
- bool isValidating() const { return SkToBool(fFlags & kValidation_Flag); }
-
const uint32_t fFlags;
SkFactorySet* fFactorySet;
SkWriter32 fWriter;
@@ -118,6 +116,9 @@ private:
SkRefCntSet* fTFSet;
SkAutoTUnref<SkPixelSerializer> fPixelSerializer;
+
+ // Only used if we do not have an fFactorySet
+ SkTHashMap<SkString, uint32_t> fFlattenableDict;
};
#endif // SkWriteBuffer_DEFINED
« no previous file with comments | « include/core/SkFlattenable.h ('k') | src/core/SkFlattenableSerialization.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698