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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 | 269 |
270 static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*); | 270 static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*); |
271 static SkPictureData* Backport(const SkRecord&, const SkPictInfo&, | 271 static SkPictureData* Backport(const SkRecord&, const SkPictInfo&, |
272 SkPicture const* const drawablePics[], int dr
awableCount); | 272 SkPicture const* const drawablePics[], int dr
awableCount); |
273 | 273 |
274 // uint32_t fRefCnt; from SkNVRefCnt<SkPicture> | 274 // uint32_t fRefCnt; from SkNVRefCnt<SkPicture> |
275 const uint32_t fUniqueID; | 275 const uint32_t fUniqueID; |
276 const SkRect fCullRect; | 276 const SkRect fCullRect; |
277 mutable SkAutoTUnref<const AccelData> fAccelData; | 277 mutable SkAutoTUnref<const AccelData> fAccelData; |
278 mutable SkTDArray<DeletionListener*> fDeletionListeners; // pointers are re
fed | 278 mutable SkTDArray<DeletionListener*> fDeletionListeners; // pointers are re
fed |
279 SkAutoTDelete<const SkRecord> fRecord; | 279 SkAutoTUnref<const SkRecord> fRecord; |
280 SkAutoTUnref<const SkBBoxHierarchy> fBBH; | 280 SkAutoTUnref<const SkBBoxHierarchy> fBBH; |
281 SkAutoTDelete<const SnapshotArray> fDrawablePicts; | 281 SkAutoTDelete<const SnapshotArray> fDrawablePicts; |
282 | 282 |
283 // helpers for fDrawablePicts | 283 // helpers for fDrawablePicts |
284 int drawableCount() const; | 284 int drawableCount() const; |
285 // will return NULL if drawableCount() returns 0 | 285 // will return NULL if drawableCount() returns 0 |
286 SkPicture const* const* drawablePicts() const; | 286 SkPicture const* const* drawablePicts() const; |
287 | 287 |
288 struct PathCounter; | 288 struct PathCounter; |
289 | 289 |
290 struct Analysis { | 290 struct Analysis { |
291 Analysis() {} // Only used by SkPictureData codepath. | 291 Analysis() {} // Only used by SkPictureData codepath. |
292 explicit Analysis(const SkRecord&); | 292 explicit Analysis(const SkRecord&); |
293 | 293 |
294 bool suitableForGpuRasterization(const char** reason, int sampleCount) c
onst; | 294 bool suitableForGpuRasterization(const char** reason, int sampleCount) c
onst; |
295 | 295 |
296 bool fWillPlaybackBitmaps; | 296 bool fWillPlaybackBitmaps; |
297 bool fHasText; | 297 bool fHasText; |
298 int fNumPaintWithPathEffectUses; | 298 int fNumPaintWithPathEffectUses; |
299 int fNumFastPathDashEffects; | 299 int fNumFastPathDashEffects; |
300 int fNumAAConcavePaths; | 300 int fNumAAConcavePaths; |
301 int fNumAAHairlineConcavePaths; | 301 int fNumAAHairlineConcavePaths; |
302 int fNumAADFEligibleConcavePaths; | 302 int fNumAADFEligibleConcavePaths; |
303 } fAnalysis; | 303 } fAnalysis; |
304 | 304 |
305 friend class SkPictureRecorder; // SkRecord-based constructor. | 305 friend class SkPictureRecorder; // SkRecord-based constructor. |
306 friend class GrLayerHoister; // access to fRecord | 306 friend class GrLayerHoister; // access to fRecord |
307 friend class ReplaceDraw; | 307 friend class ReplaceDraw; |
308 friend class SkPictureUtils; | 308 friend class SkPictureUtils; |
| 309 friend class SkRecordedDrawable; |
309 }; | 310 }; |
310 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize); | 311 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize); |
311 | 312 |
312 #endif | 313 #endif |
OLD | NEW |