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

Side by Side 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: Avoid duping strings 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 unified diff | Download patch
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #ifndef SkWriteBuffer_DEFINED 9 #ifndef SkWriteBuffer_DEFINED
10 #define SkWriteBuffer_DEFINED 10 #define SkWriteBuffer_DEFINED
11 11
12 #include "SkData.h" 12 #include "SkData.h"
13 #include "SkImage.h" 13 #include "SkImage.h"
14 #include "SkPath.h" 14 #include "SkPath.h"
15 #include "SkPicture.h" 15 #include "SkPicture.h"
16 #include "SkPixelSerializer.h" 16 #include "SkPixelSerializer.h"
17 #include "SkRefCnt.h" 17 #include "SkRefCnt.h"
18 #include "SkWriter32.h" 18 #include "SkWriter32.h"
19 #include "../private/SkTHash.h"
19 20
20 class SkBitmap; 21 class SkBitmap;
21 class SkBitmapHeap; 22 class SkBitmapHeap;
22 class SkFactorySet; 23 class SkFactorySet;
23 class SkFlattenable; 24 class SkFlattenable;
24 class SkRefCntSet; 25 class SkRefCntSet;
25 26
26 class SkWriteBuffer { 27 class SkWriteBuffer {
27 public: 28 public:
28 enum Flags { 29 enum Flags {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 bool isValidating() const { return SkToBool(fFlags & kValidation_Flag); } 112 bool isValidating() const { return SkToBool(fFlags & kValidation_Flag); }
112 113
113 const uint32_t fFlags; 114 const uint32_t fFlags;
114 SkFactorySet* fFactorySet; 115 SkFactorySet* fFactorySet;
115 SkWriter32 fWriter; 116 SkWriter32 fWriter;
116 117
117 SkBitmapHeap* fBitmapHeap; 118 SkBitmapHeap* fBitmapHeap;
118 SkRefCntSet* fTFSet; 119 SkRefCntSet* fTFSet;
119 120
120 SkAutoTUnref<SkPixelSerializer> fPixelSerializer; 121 SkAutoTUnref<SkPixelSerializer> fPixelSerializer;
122
123 // Only used if we do not have an fFactorySet
124 SkTHashMap<SkString, uint32_t> fFlattenableDict;
125 uint32_t fNextIndex;
121 }; 126 };
122 127
123 #endif // SkWriteBuffer_DEFINED 128 #endif // SkWriteBuffer_DEFINED
OLDNEW
« no previous file with comments | « include/core/SkFlattenable.h ('k') | src/core/SkReadBuffer.h » ('j') | src/core/SkReadBuffer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698