| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2007 The Android Open Source Project | 3 * Copyright 2007 The Android Open Source Project |
| 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 | 9 |
| 10 #ifndef SkPicture_DEFINED | 10 #ifndef SkPicture_DEFINED |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 * recorded: some calls may be recorded as more than one operation, or some | 193 * recorded: some calls may be recorded as more than one operation, or some |
| 194 * calls may be optimized away. | 194 * calls may be optimized away. |
| 195 */ | 195 */ |
| 196 int approximateOpCount() const; | 196 int approximateOpCount() const; |
| 197 | 197 |
| 198 /** Return true if this picture contains text. | 198 /** Return true if this picture contains text. |
| 199 */ | 199 */ |
| 200 bool hasText() const; | 200 bool hasText() const; |
| 201 | 201 |
| 202 // A refcounted array of refcounted const SkPicture pointers. | 202 // A refcounted array of refcounted const SkPicture pointers. |
| 203 struct SnapshotArray : public SkNVRefCnt { | 203 struct SnapshotArray : public SkNVRefCnt<SnapshotArray> { |
| 204 SnapshotArray(const SkPicture* pics[], size_t count) : fPics(pics), fCou
nt(count) {} | 204 SnapshotArray(const SkPicture* pics[], size_t count) : fPics(pics), fCou
nt(count) {} |
| 205 ~SnapshotArray() { for (size_t i = 0; i < fCount; i++) { fPics[i]->unref
(); } } | 205 ~SnapshotArray() { for (size_t i = 0; i < fCount; i++) { fPics[i]->unref
(); } } |
| 206 | 206 |
| 207 const SkPicture* const* begin() const { return fPics; } | 207 const SkPicture* const* begin() const { return fPics; } |
| 208 size_t count() const { return fCount; } | 208 size_t count() const { return fCount; } |
| 209 private: | 209 private: |
| 210 SkAutoTMalloc<const SkPicture*> fPics; | 210 SkAutoTMalloc<const SkPicture*> fPics; |
| 211 size_t fCount; | 211 size_t fCount; |
| 212 }; | 212 }; |
| 213 | 213 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 } fAnalysis; | 302 } fAnalysis; |
| 303 | 303 |
| 304 friend class SkPictureRecorder; // SkRecord-based constructor. | 304 friend class SkPictureRecorder; // SkRecord-based constructor. |
| 305 friend class GrLayerHoister; // access to fRecord | 305 friend class GrLayerHoister; // access to fRecord |
| 306 friend class ReplaceDraw; | 306 friend class ReplaceDraw; |
| 307 friend class SkPictureUtils; | 307 friend class SkPictureUtils; |
| 308 }; | 308 }; |
| 309 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize); | 309 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize); |
| 310 | 310 |
| 311 #endif | 311 #endif |
| OLD | NEW |