Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Side by Side Diff: src/core/SkBigPicture.h

Issue 1939503002: remove non-static uses of SkOncePtr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: leave it Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/private/SkOncePtr.h ('k') | src/core/SkBigPicture.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkBigPicture_DEFINED 8 #ifndef SkBigPicture_DEFINED
9 #define SkBigPicture_DEFINED 9 #define SkBigPicture_DEFINED
10 10
11 #include "SkOncePtr.h" 11 #include "SkOnce.h"
12 #include "SkPicture.h" 12 #include "SkPicture.h"
13 #include "SkRect.h" 13 #include "SkRect.h"
14 #include "SkTemplates.h" 14 #include "SkTemplates.h"
15 15
16 class SkBBoxHierarchy; 16 class SkBBoxHierarchy;
17 class SkMatrix; 17 class SkMatrix;
18 class SkRecord; 18 class SkRecord;
19 19
20 // An implementation of SkPicture supporting an arbitrary number of drawing comm ands. 20 // An implementation of SkPicture supporting an arbitrary number of drawing comm ands.
21 class SkBigPicture final : public SkPicture { 21 class SkBigPicture final : public SkPicture {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 int start, 58 int start,
59 int stop, 59 int stop,
60 const SkMatrix& initialCTM) const; 60 const SkMatrix& initialCTM) const;
61 // Used by GrRecordReplaceDraw 61 // Used by GrRecordReplaceDraw
62 const SkBBoxHierarchy* bbh() const { return fBBH; } 62 const SkBBoxHierarchy* bbh() const { return fBBH; }
63 const SkRecord* record() const { return fRecord; } 63 const SkRecord* record() const { return fRecord; }
64 const AccelData* accelData() const { return fAccelData; } 64 const AccelData* accelData() const { return fAccelData; }
65 65
66 private: 66 private:
67 struct Analysis { 67 struct Analysis {
68 explicit Analysis(const SkRecord&); 68 void init(const SkRecord&);
69 69
70 bool suitableForGpuRasterization(const char** reason) const; 70 bool suitableForGpuRasterization(const char** reason) const;
71 71
72 uint8_t fNumSlowPathsAndDashEffects; 72 uint8_t fNumSlowPathsAndDashEffects;
73 bool fWillPlaybackBitmaps : 1; 73 bool fWillPlaybackBitmaps : 1;
74 bool fHasText : 1; 74 bool fHasText : 1;
75 }; 75 };
76 76
77 int numSlowPaths() const override; 77 int numSlowPaths() const override;
78 const Analysis& analysis() const; 78 const Analysis& analysis() const;
79 int drawableCount() const; 79 int drawableCount() const;
80 SkPicture const* const* drawablePicts() const; 80 SkPicture const* const* drawablePicts() const;
81 81
82 const SkRect fCullRect; 82 const SkRect fCullRect;
83 const size_t fApproxBytesUsedBySubPictures; 83 const size_t fApproxBytesUsedBySubPictures;
84 SkOncePtr<const Analysis> fAnalysis; 84 mutable SkOnce fAnalysisOnce;
85 mutable Analysis fAnalysis;
85 SkAutoTUnref<const SkRecord> fRecord; 86 SkAutoTUnref<const SkRecord> fRecord;
86 SkAutoTDelete<const SnapshotArray> fDrawablePicts; 87 SkAutoTDelete<const SnapshotArray> fDrawablePicts;
87 SkAutoTUnref<const SkBBoxHierarchy> fBBH; 88 SkAutoTUnref<const SkBBoxHierarchy> fBBH;
88 SkAutoTUnref<const AccelData> fAccelData; 89 SkAutoTUnref<const AccelData> fAccelData;
89 }; 90 };
90 91
91 #endif//SkBigPicture_DEFINED 92 #endif//SkBigPicture_DEFINED
OLDNEW
« no previous file with comments | « include/private/SkOncePtr.h ('k') | src/core/SkBigPicture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698