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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 SkPicture(SkScalar width, SkScalar height, const SkPictureRecord& record, bo
ol deepCopyOps); | 270 SkPicture(SkScalar width, SkScalar height, const SkPictureRecord& record, bo
ol deepCopyOps); |
271 | 271 |
272 void createHeader(SkPictInfo* info) const; | 272 void createHeader(SkPictInfo* info) const; |
273 static bool IsValidPictInfo(const SkPictInfo& info); | 273 static bool IsValidPictInfo(const SkPictInfo& info); |
274 | 274 |
275 friend class SkPictureRecorder; // just for SkPicture-based const
ructor | 275 friend class SkPictureRecorder; // just for SkPicture-based const
ructor |
276 friend class SkGpuDevice; // for fData access | 276 friend class SkGpuDevice; // for fData access |
277 friend class GrLayerHoister; // access to fRecord | 277 friend class GrLayerHoister; // access to fRecord |
278 friend class CollectLayers; // access to fRecord | 278 friend class CollectLayers; // access to fRecord |
279 friend class SkPicturePlayback; // to get fData | 279 friend class SkPicturePlayback; // to get fData |
280 friend void GrRecordReplaceDraw(const SkPicture* picture, | 280 friend class ReplaceDraw; |
281 SkCanvas* canvas, | |
282 const GrReplacements* replacements, | |
283 const SkMatrix& initialMatrix, | |
284 SkDrawPictureCallback* callback); | |
285 | 281 |
286 typedef SkRefCnt INHERITED; | 282 typedef SkRefCnt INHERITED; |
287 | 283 |
288 // Takes ownership of the SkRecord, refs the (optional) BBH. | 284 // Takes ownership of the SkRecord, refs the (optional) BBH. |
289 SkPicture(SkScalar width, SkScalar height, SkRecord*, SkBBoxHierarchy*); | 285 SkPicture(SkScalar width, SkScalar height, SkRecord*, SkBBoxHierarchy*); |
290 // Return as a new SkPicture that's backed by SkRecord. | 286 // Return as a new SkPicture that's backed by SkRecord. |
291 static SkPicture* Forwardport(const SkPicture&); | 287 static SkPicture* Forwardport(const SkPicture&); |
292 | 288 |
293 SkAutoTDelete<SkRecord> fRecord; | 289 SkAutoTDelete<SkRecord> fRecord; |
294 SkAutoTUnref<SkBBoxHierarchy> fBBH; | 290 SkAutoTUnref<SkBBoxHierarchy> fBBH; |
295 | 291 |
296 struct PathCounter; | 292 struct PathCounter; |
297 | 293 |
298 struct Analysis { | 294 struct Analysis { |
299 Analysis() {} // Only used by SkPictureData codepath. | 295 Analysis() {} // Only used by SkPictureData codepath. |
300 explicit Analysis(const SkRecord&); | 296 explicit Analysis(const SkRecord&); |
301 | 297 |
302 bool suitableForGpuRasterization(const char** reason, int sampleCount) c
onst; | 298 bool suitableForGpuRasterization(const char** reason, int sampleCount) c
onst; |
303 | 299 |
304 bool fWillPlaybackBitmaps; | 300 bool fWillPlaybackBitmaps; |
305 bool fHasText; | 301 bool fHasText; |
306 int fNumPaintWithPathEffectUses; | 302 int fNumPaintWithPathEffectUses; |
307 int fNumFastPathDashEffects; | 303 int fNumFastPathDashEffects; |
308 int fNumAAConcavePaths; | 304 int fNumAAConcavePaths; |
309 int fNumAAHairlineConcavePaths; | 305 int fNumAAHairlineConcavePaths; |
310 } fAnalysis; | 306 } fAnalysis; |
311 }; | 307 }; |
312 | 308 |
313 #endif | 309 #endif |
OLD | NEW |