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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 | 294 |
295 void createHeader(SkPictInfo* info) const; | 295 void createHeader(SkPictInfo* info) const; |
296 static bool IsValidPictInfo(const SkPictInfo& info); | 296 static bool IsValidPictInfo(const SkPictInfo& info); |
297 | 297 |
298 friend class SkPictureData; // to access OperationList | 298 friend class SkPictureData; // to access OperationList |
299 friend class SkPictureRecorder; // just for SkPicture-based const
ructor | 299 friend class SkPictureRecorder; // just for SkPicture-based const
ructor |
300 friend class SkGpuDevice; // for fData access | 300 friend class SkGpuDevice; // for fData access |
301 friend class GrLayerHoister; // access to fRecord | 301 friend class GrLayerHoister; // access to fRecord |
302 friend class CollectLayers; // access to fRecord | 302 friend class CollectLayers; // access to fRecord |
303 friend class SkPicturePlayback; // to get fData & OperationList | 303 friend class SkPicturePlayback; // to get fData & OperationList |
304 friend void GrRecordReplaceDraw(const SkPicture* picture, | 304 friend class ReplaceDraw; |
305 SkCanvas* canvas, | |
306 const GrReplacements* replacements, | |
307 const SkMatrix& initialMatrix, | |
308 SkDrawPictureCallback* callback); | |
309 | 305 |
310 typedef SkRefCnt INHERITED; | 306 typedef SkRefCnt INHERITED; |
311 | 307 |
312 // Takes ownership of the SkRecord, refs the (optional) BBH. | 308 // Takes ownership of the SkRecord, refs the (optional) BBH. |
313 SkPicture(SkScalar width, SkScalar height, SkRecord*, SkBBoxHierarchy*); | 309 SkPicture(SkScalar width, SkScalar height, SkRecord*, SkBBoxHierarchy*); |
314 // Return as a new SkPicture that's backed by SkRecord. | 310 // Return as a new SkPicture that's backed by SkRecord. |
315 static SkPicture* Forwardport(const SkPicture&); | 311 static SkPicture* Forwardport(const SkPicture&); |
316 | 312 |
317 SkAutoTDelete<SkRecord> fRecord; | 313 SkAutoTDelete<SkRecord> fRecord; |
318 SkAutoTUnref<SkBBoxHierarchy> fBBH; | 314 SkAutoTUnref<SkBBoxHierarchy> fBBH; |
319 | 315 |
320 struct PathCounter; | 316 struct PathCounter; |
321 | 317 |
322 struct Analysis { | 318 struct Analysis { |
323 Analysis() {} // Only used by SkPictureData codepath. | 319 Analysis() {} // Only used by SkPictureData codepath. |
324 explicit Analysis(const SkRecord&); | 320 explicit Analysis(const SkRecord&); |
325 | 321 |
326 bool suitableForGpuRasterization(const char** reason, int sampleCount) c
onst; | 322 bool suitableForGpuRasterization(const char** reason, int sampleCount) c
onst; |
327 | 323 |
328 bool fWillPlaybackBitmaps; | 324 bool fWillPlaybackBitmaps; |
329 bool fHasText; | 325 bool fHasText; |
330 int fNumPaintWithPathEffectUses; | 326 int fNumPaintWithPathEffectUses; |
331 int fNumFastPathDashEffects; | 327 int fNumFastPathDashEffects; |
332 int fNumAAConcavePaths; | 328 int fNumAAConcavePaths; |
333 int fNumAAHairlineConcavePaths; | 329 int fNumAAHairlineConcavePaths; |
334 } fAnalysis; | 330 } fAnalysis; |
335 }; | 331 }; |
336 | 332 |
337 #endif | 333 #endif |
OLD | NEW |