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

Side by Side Diff: include/core/SkWriteBuffer.h

Issue 1903483002: Delete unused fNamedFactorySet from SkWriteBuffer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
« no previous file with comments | « no previous file | src/core/SkPictureFlat.h » ('j') | src/core/SkPictureFlat.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 19
20 class SkBitmap; 20 class SkBitmap;
21 class SkBitmapHeap; 21 class SkBitmapHeap;
22 class SkFactorySet; 22 class SkFactorySet;
23 class SkFlattenable; 23 class SkFlattenable;
24 class SkNamedFactorySet;
25 class SkRefCntSet; 24 class SkRefCntSet;
26 25
27 class SkWriteBuffer { 26 class SkWriteBuffer {
28 public: 27 public:
29 enum Flags { 28 enum Flags {
30 kCrossProcess_Flag = 1 << 0, 29 kCrossProcess_Flag = 1 << 0,
31 kValidation_Flag = 1 << 1, 30 kValidation_Flag = 1 << 1,
32 }; 31 };
33 32
34 SkWriteBuffer(uint32_t flags = 0); 33 SkWriteBuffer(uint32_t flags = 0);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 size_t writeStream(SkStream* stream, size_t length); 73 size_t writeStream(SkStream* stream, size_t length);
75 void writeBitmap(const SkBitmap& bitmap); 74 void writeBitmap(const SkBitmap& bitmap);
76 void writeImage(const SkImage*); 75 void writeImage(const SkImage*);
77 void writeTypeface(SkTypeface* typeface); 76 void writeTypeface(SkTypeface* typeface);
78 void writePaint(const SkPaint& paint) { paint.flatten(*this); } 77 void writePaint(const SkPaint& paint) { paint.flatten(*this); }
79 78
80 bool writeToStream(SkWStream*); 79 bool writeToStream(SkWStream*);
81 void writeToMemory(void* dst) { fWriter.flatten(dst); } 80 void writeToMemory(void* dst) { fWriter.flatten(dst); }
82 81
83 SkFactorySet* setFactoryRecorder(SkFactorySet*); 82 SkFactorySet* setFactoryRecorder(SkFactorySet*);
84 SkNamedFactorySet* setNamedFactoryRecorder(SkNamedFactorySet*);
85 83
86 SkRefCntSet* getTypefaceRecorder() const { return fTFSet; } 84 SkRefCntSet* getTypefaceRecorder() const { return fTFSet; }
87 SkRefCntSet* setTypefaceRecorder(SkRefCntSet*); 85 SkRefCntSet* setTypefaceRecorder(SkRefCntSet*);
88 86
89 /** 87 /**
90 * Set an SkBitmapHeap to store bitmaps rather than flattening. 88 * Set an SkBitmapHeap to store bitmaps rather than flattening.
91 * 89 *
92 * Incompatible with an SkPixelSerializer. If an SkPixelSerializer is set, 90 * Incompatible with an SkPixelSerializer. If an SkPixelSerializer is set,
93 * setting an SkBitmapHeap will set the SkPixelSerializer to NULL in release 91 * setting an SkBitmapHeap will set the SkPixelSerializer to NULL in release
94 * and crash in debug. 92 * and crash in debug.
(...skipping 12 matching lines...) Expand all
107 * be set to NULL in release and crash in debug. 105 * be set to NULL in release and crash in debug.
108 */ 106 */
109 void setPixelSerializer(SkPixelSerializer*); 107 void setPixelSerializer(SkPixelSerializer*);
110 SkPixelSerializer* getPixelSerializer() const { return fPixelSerializer; } 108 SkPixelSerializer* getPixelSerializer() const { return fPixelSerializer; }
111 109
112 private: 110 private:
113 bool isValidating() const { return SkToBool(fFlags & kValidation_Flag); } 111 bool isValidating() const { return SkToBool(fFlags & kValidation_Flag); }
114 112
115 const uint32_t fFlags; 113 const uint32_t fFlags;
116 SkFactorySet* fFactorySet; 114 SkFactorySet* fFactorySet;
117 SkNamedFactorySet* fNamedFactorySet;
118 SkWriter32 fWriter; 115 SkWriter32 fWriter;
119 116
120 SkBitmapHeap* fBitmapHeap; 117 SkBitmapHeap* fBitmapHeap;
121 SkRefCntSet* fTFSet; 118 SkRefCntSet* fTFSet;
122 119
123 SkAutoTUnref<SkPixelSerializer> fPixelSerializer; 120 SkAutoTUnref<SkPixelSerializer> fPixelSerializer;
124 }; 121 };
125 122
126 #endif // SkWriteBuffer_DEFINED 123 #endif // SkWriteBuffer_DEFINED
OLDNEW
« no previous file with comments | « no previous file | src/core/SkPictureFlat.h » ('j') | src/core/SkPictureFlat.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698