| 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 |
| 11 #define SkPicture_DEFINED | 11 #define SkPicture_DEFINED |
| 12 | 12 |
| 13 #include "SkBitmap.h" | 13 #include "SkBitmap.h" |
| 14 #include "SkDrawPictureCallback.h" | 14 #include "SkDrawPictureCallback.h" |
| 15 #include "SkImageDecoder.h" | 15 #include "SkImageDecoder.h" |
| 16 #include "SkRefCnt.h" | 16 #include "SkRefCnt.h" |
| 17 #include "SkTDArray.h" | 17 #include "SkTDArray.h" |
| 18 | 18 |
| 19 #if SK_SUPPORT_GPU | 19 #if SK_SUPPORT_GPU |
| 20 class GrContext; | 20 class GrContext; |
| 21 #endif | 21 #endif |
| 22 | 22 |
| 23 class GrAccelData; |
| 23 class GrReplacements; | 24 class GrReplacements; |
| 24 class SkBBoxHierarchy; | 25 class SkBBoxHierarchy; |
| 25 class SkCanvas; | 26 class SkCanvas; |
| 26 class SkData; | 27 class SkData; |
| 27 class SkPictureData; | 28 class SkPictureData; |
| 28 class SkPictureRecord; | 29 class SkPictureRecord; |
| 29 class SkStream; | 30 class SkStream; |
| 30 class SkWStream; | 31 class SkWStream; |
| 31 | 32 |
| 32 struct SkPictInfo; | 33 struct SkPictInfo; |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 SkPicture(SkPictureData* data, SkScalar width, SkScalar height); | 274 SkPicture(SkPictureData* data, SkScalar width, SkScalar height); |
| 274 | 275 |
| 275 SkPicture(SkScalar width, SkScalar height, const SkPictureRecord& record, bo
ol deepCopyOps); | 276 SkPicture(SkScalar width, SkScalar height, const SkPictureRecord& record, bo
ol deepCopyOps); |
| 276 | 277 |
| 277 void createHeader(SkPictInfo* info) const; | 278 void createHeader(SkPictInfo* info) const; |
| 278 static bool IsValidPictInfo(const SkPictInfo& info); | 279 static bool IsValidPictInfo(const SkPictInfo& info); |
| 279 | 280 |
| 280 friend class SkPictureRecorder; // SkRecord-based constructor. | 281 friend class SkPictureRecorder; // SkRecord-based constructor. |
| 281 friend class SkGpuDevice; // for fData access | 282 friend class SkGpuDevice; // for fData access |
| 282 friend class GrLayerHoister; // access to fRecord | 283 friend class GrLayerHoister; // access to fRecord |
| 283 friend class SkRecords::CollectLayers; // access to fRecord | |
| 284 friend class SkPicturePlayback; // to get fData | 284 friend class SkPicturePlayback; // to get fData |
| 285 friend class ReplaceDraw; | 285 friend class ReplaceDraw; |
| 286 friend const GrAccelData* GPUOptimize(const SkPicture* pict); |
| 286 | 287 |
| 287 typedef SkRefCnt INHERITED; | 288 typedef SkRefCnt INHERITED; |
| 288 | 289 |
| 289 // Takes ownership of the SkRecord, refs the (optional) BBH. | 290 // Takes ownership of the SkRecord, refs the (optional) BBH. |
| 290 SkPicture(SkScalar width, SkScalar height, SkRecord*, SkBBoxHierarchy*); | 291 SkPicture(SkScalar width, SkScalar height, SkRecord*, SkBBoxHierarchy*); |
| 291 // Return as a new SkPicture that's backed by SkRecord. | 292 // Return as a new SkPicture that's backed by SkRecord. |
| 292 static SkPicture* Forwardport(const SkPicture&); | 293 static SkPicture* Forwardport(const SkPicture&); |
| 293 // Return as a new SkPicture that's backed by the old backend. | 294 // Return as a new SkPicture that's backed by the old backend. |
| 294 static SkPicture* Backport(const SkRecord& src, const SkRect& cullRect); | 295 static SkPicture* Backport(const SkRecord& src, const SkRect& cullRect); |
| 295 | 296 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 308 bool fHasText; | 309 bool fHasText; |
| 309 int fNumPaintWithPathEffectUses; | 310 int fNumPaintWithPathEffectUses; |
| 310 int fNumFastPathDashEffects; | 311 int fNumFastPathDashEffects; |
| 311 int fNumAAConcavePaths; | 312 int fNumAAConcavePaths; |
| 312 int fNumAAHairlineConcavePaths; | 313 int fNumAAHairlineConcavePaths; |
| 313 int fNumAADFEligibleConcavePaths; | 314 int fNumAADFEligibleConcavePaths; |
| 314 } fAnalysis; | 315 } fAnalysis; |
| 315 }; | 316 }; |
| 316 | 317 |
| 317 #endif | 318 #endif |
| OLD | NEW |