OLD | NEW |
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 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 #endif | 76 #endif |
77 SkPictureData(const SkPictureRecord& record, const SkPictInfo&, bool deepCop
yOps); | 77 SkPictureData(const SkPictureRecord& record, const SkPictInfo&, bool deepCop
yOps); |
78 static SkPictureData* CreateFromStream(SkStream*, | 78 static SkPictureData* CreateFromStream(SkStream*, |
79 const SkPictInfo&, | 79 const SkPictInfo&, |
80 SkPicture::InstallPixelRefProc); | 80 SkPicture::InstallPixelRefProc); |
81 static SkPictureData* CreateFromBuffer(SkReadBuffer&, const SkPictInfo&); | 81 static SkPictureData* CreateFromBuffer(SkReadBuffer&, const SkPictInfo&); |
82 | 82 |
83 virtual ~SkPictureData(); | 83 virtual ~SkPictureData(); |
84 | 84 |
85 const SkPicture::OperationList* getActiveOps(const SkIRect& queryRect) const
; | 85 const SkPicture::OperationList* getActiveOps(const SkIRect& queryRect) const
; |
| 86 int countOps() const { return fContentInfo.numOperations(); } |
86 | 87 |
87 void serialize(SkWStream*, SkPicture::EncodeBitmap) const; | 88 void serialize(SkWStream*, SkPicture::EncodeBitmap) const; |
88 void flatten(SkWriteBuffer&) const; | 89 void flatten(SkWriteBuffer&) const; |
89 | 90 |
90 bool containsBitmaps() const; | 91 bool containsBitmaps() const; |
91 | 92 |
92 const SkData* opData() const { return fOpData; } | 93 const SkData* opData() const { return fOpData; } |
93 | 94 |
94 protected: | 95 protected: |
95 explicit SkPictureData(const SkPictInfo& info); | 96 explicit SkPictureData(const SkPictInfo& info); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 | 191 |
191 const SkPictInfo fInfo; | 192 const SkPictInfo fInfo; |
192 | 193 |
193 static void WriteFactories(SkWStream* stream, const SkFactorySet& rec); | 194 static void WriteFactories(SkWStream* stream, const SkFactorySet& rec); |
194 static void WriteTypefaces(SkWStream* stream, const SkRefCntSet& rec); | 195 static void WriteTypefaces(SkWStream* stream, const SkRefCntSet& rec); |
195 | 196 |
196 void initForPlayback() const; | 197 void initForPlayback() const; |
197 }; | 198 }; |
198 | 199 |
199 #endif | 200 #endif |
OLD | NEW |