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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 86 |
87 void serialize(SkWStream*, SkPicture::EncodeBitmap) const; | 87 void serialize(SkWStream*, SkPicture::EncodeBitmap) const; |
88 void flatten(SkWriteBuffer&) const; | 88 void flatten(SkWriteBuffer&) const; |
89 | 89 |
90 bool containsBitmaps() const; | 90 bool containsBitmaps() const; |
91 | 91 |
| 92 bool hasText() const { return fContentInfo.hasText(); } |
| 93 |
92 int opCount() const { return fContentInfo.numOperations(); } | 94 int opCount() const { return fContentInfo.numOperations(); } |
93 | 95 |
94 const SkData* opData() const { return fOpData; } | 96 const SkData* opData() const { return fOpData; } |
95 | 97 |
96 protected: | 98 protected: |
97 explicit SkPictureData(const SkPictInfo& info); | 99 explicit SkPictureData(const SkPictInfo& info); |
98 | 100 |
99 bool parseStream(SkStream*, SkPicture::InstallPixelRefProc); | 101 bool parseStream(SkStream*, SkPicture::InstallPixelRefProc); |
100 bool parseBuffer(SkReadBuffer& buffer); | 102 bool parseBuffer(SkReadBuffer& buffer); |
101 | 103 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 194 |
193 const SkPictInfo fInfo; | 195 const SkPictInfo fInfo; |
194 | 196 |
195 static void WriteFactories(SkWStream* stream, const SkFactorySet& rec); | 197 static void WriteFactories(SkWStream* stream, const SkFactorySet& rec); |
196 static void WriteTypefaces(SkWStream* stream, const SkRefCntSet& rec); | 198 static void WriteTypefaces(SkWStream* stream, const SkRefCntSet& rec); |
197 | 199 |
198 void initForPlayback() const; | 200 void initForPlayback() const; |
199 }; | 201 }; |
200 | 202 |
201 #endif | 203 #endif |
OLD | NEW |