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

Side by Side Diff: src/core/SkPictureData.h

Issue 784643002: Replace EncodeBitmap with an interface. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years 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 | « src/core/SkPicture.cpp ('k') | src/core/SkPictureData.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkPictureData_DEFINED 8 #ifndef SkPictureData_DEFINED
9 #define SkPictureData_DEFINED 9 #define SkPictureData_DEFINED
10 10
11 #include "SkBitmap.h" 11 #include "SkBitmap.h"
12 #include "SkPicture.h" 12 #include "SkPicture.h"
13 #include "SkPictureContentInfo.h" 13 #include "SkPictureContentInfo.h"
14 #include "SkPictureFlat.h" 14 #include "SkPictureFlat.h"
15 15
16 class SkData; 16 class SkData;
17 class SkPictureRecord; 17 class SkPictureRecord;
18 class SkPixelSerializer;
18 class SkReader32; 19 class SkReader32;
19 class SkStream; 20 class SkStream;
20 class SkWStream; 21 class SkWStream;
21 class SkBBoxHierarchy; 22 class SkBBoxHierarchy;
22 class SkMatrix; 23 class SkMatrix;
23 class SkPaint; 24 class SkPaint;
24 class SkPath; 25 class SkPath;
25 class SkReadBuffer; 26 class SkReadBuffer;
26 class SkTextBlob; 27 class SkTextBlob;
27 28
(...skipping 29 matching lines...) Expand all
57 class SkPictureData { 58 class SkPictureData {
58 public: 59 public:
59 SkPictureData(const SkPictureRecord& record, const SkPictInfo&, bool deepCop yOps); 60 SkPictureData(const SkPictureRecord& record, const SkPictInfo&, bool deepCop yOps);
60 static SkPictureData* CreateFromStream(SkStream*, 61 static SkPictureData* CreateFromStream(SkStream*,
61 const SkPictInfo&, 62 const SkPictInfo&,
62 SkPicture::InstallPixelRefProc); 63 SkPicture::InstallPixelRefProc);
63 static SkPictureData* CreateFromBuffer(SkReadBuffer&, const SkPictInfo&); 64 static SkPictureData* CreateFromBuffer(SkReadBuffer&, const SkPictInfo&);
64 65
65 virtual ~SkPictureData(); 66 virtual ~SkPictureData();
66 67
67 void serialize(SkWStream*, SkPicture::EncodeBitmap) const; 68 void serialize(SkWStream*, SkPixelSerializer*) const;
68 void flatten(SkWriteBuffer&) const; 69 void flatten(SkWriteBuffer&) const;
69 70
70 bool containsBitmaps() const; 71 bool containsBitmaps() const;
71 72
72 bool hasText() const { return fContentInfo.hasText(); } 73 bool hasText() const { return fContentInfo.hasText(); }
73 74
74 int opCount() const { return fContentInfo.numOperations(); } 75 int opCount() const { return fContentInfo.numOperations(); }
75 76
76 const SkData* opData() const { return fOpData; } 77 const SkData* opData() const { return fOpData; }
77 78
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 161
161 const SkPictInfo fInfo; 162 const SkPictInfo fInfo;
162 163
163 static void WriteFactories(SkWStream* stream, const SkFactorySet& rec); 164 static void WriteFactories(SkWStream* stream, const SkFactorySet& rec);
164 static void WriteTypefaces(SkWStream* stream, const SkRefCntSet& rec); 165 static void WriteTypefaces(SkWStream* stream, const SkRefCntSet& rec);
165 166
166 void initForPlayback() const; 167 void initForPlayback() const;
167 }; 168 };
168 169
169 #endif 170 #endif
OLDNEW
« no previous file with comments | « src/core/SkPicture.cpp ('k') | src/core/SkPictureData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698