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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 SkRecords::CollectLayers; // access to fRecord |
284 friend class SkPicturePlayback; // to get fData | 285 friend class SkPicturePlayback; // to get fData |
285 friend class ReplaceDraw; | 286 friend class ReplaceDraw; |
| 287 friend const GrAccelData* GPUOptimize(const SkPicture* pict); |
286 | 288 |
287 typedef SkRefCnt INHERITED; | 289 typedef SkRefCnt INHERITED; |
288 | 290 |
289 // Takes ownership of the SkRecord, refs the (optional) BBH. | 291 // Takes ownership of the SkRecord, refs the (optional) BBH. |
290 SkPicture(SkScalar width, SkScalar height, SkRecord*, SkBBoxHierarchy*); | 292 SkPicture(SkScalar width, SkScalar height, SkRecord*, SkBBoxHierarchy*); |
291 // Return as a new SkPicture that's backed by SkRecord. | 293 // Return as a new SkPicture that's backed by SkRecord. |
292 static SkPicture* Forwardport(const SkPicture&); | 294 static SkPicture* Forwardport(const SkPicture&); |
293 // Return as a new SkPicture that's backed by the old backend. | 295 // Return as a new SkPicture that's backed by the old backend. |
294 static SkPicture* Backport(const SkRecord& src, const SkRect& cullRect); | 296 static SkPicture* Backport(const SkRecord& src, const SkRect& cullRect); |
295 | 297 |
(...skipping 12 matching lines...) Expand all Loading... |
308 bool fHasText; | 310 bool fHasText; |
309 int fNumPaintWithPathEffectUses; | 311 int fNumPaintWithPathEffectUses; |
310 int fNumFastPathDashEffects; | 312 int fNumFastPathDashEffects; |
311 int fNumAAConcavePaths; | 313 int fNumAAConcavePaths; |
312 int fNumAAHairlineConcavePaths; | 314 int fNumAAHairlineConcavePaths; |
313 int fNumAADFEligibleConcavePaths; | 315 int fNumAADFEligibleConcavePaths; |
314 } fAnalysis; | 316 } fAnalysis; |
315 }; | 317 }; |
316 | 318 |
317 #endif | 319 #endif |
OLD | NEW |