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

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

Issue 470333002: approximateOpCount (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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 | « src/core/SkPicture.cpp ('k') | no next file » | 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 2011 Google Inc. 2 * Copyright 2011 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 SkPictureData_DEFINED 8 #ifndef SkPictureData_DEFINED
9 #define SkPictureData_DEFINED 9 #define SkPictureData_DEFINED
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 virtual ~SkPictureData(); 83 virtual ~SkPictureData();
84 84
85 const SkPicture::OperationList* getActiveOps(const SkIRect& queryRect) const ; 85 const SkPicture::OperationList* getActiveOps(const SkIRect& queryRect) const ;
86 86
87 void serialize(SkWStream*, SkPicture::EncodeBitmap) const; 87 void serialize(SkWStream*, SkPicture::EncodeBitmap) const;
88 void flatten(SkWriteBuffer&) const; 88 void flatten(SkWriteBuffer&) const;
89 89
90 bool containsBitmaps() const; 90 bool containsBitmaps() const;
91 91
92 int opCount() const { return fContentInfo.numOperations(); }
93
92 const SkData* opData() const { return fOpData; } 94 const SkData* opData() const { return fOpData; }
93 95
94 protected: 96 protected:
95 explicit SkPictureData(const SkPictInfo& info); 97 explicit SkPictureData(const SkPictInfo& info);
96 98
97 bool parseStream(SkStream*, SkPicture::InstallPixelRefProc); 99 bool parseStream(SkStream*, SkPicture::InstallPixelRefProc);
98 bool parseBuffer(SkReadBuffer& buffer); 100 bool parseBuffer(SkReadBuffer& buffer);
99 101
100 public: 102 public:
101 const SkBitmap& getBitmap(SkReader32* reader) const { 103 const SkBitmap& getBitmap(SkReader32* reader) const {
(...skipping 19 matching lines...) Expand all
121 } 123 }
122 124
123 const SkPaint* getPaint(SkReader32* reader) const { 125 const SkPaint* getPaint(SkReader32* reader) const {
124 int index = reader->readInt(); 126 int index = reader->readInt();
125 if (index == 0) { 127 if (index == 0) {
126 return NULL; 128 return NULL;
127 } 129 }
128 return &(*fPaints)[index - 1]; 130 return &(*fPaints)[index - 1];
129 } 131 }
130 132
131 void initIterator(SkPictureStateTree::Iterator* iter, 133 void initIterator(SkPictureStateTree::Iterator* iter,
132 const SkTDArray<void*>& draws, 134 const SkTDArray<void*>& draws,
133 SkCanvas* canvas) const { 135 SkCanvas* canvas) const {
134 if (NULL != fStateTree) { 136 if (NULL != fStateTree) {
135 fStateTree->initIterator(iter, draws, canvas); 137 fStateTree->initIterator(iter, draws, canvas);
136 } 138 }
137 } 139 }
138 140
139 #if SK_SUPPORT_GPU 141 #if SK_SUPPORT_GPU
140 /** 142 /**
141 * sampleCount is the number of samples-per-pixel or zero if non-MSAA. 143 * sampleCount is the number of samples-per-pixel or zero if non-MSAA.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 192
191 const SkPictInfo fInfo; 193 const SkPictInfo fInfo;
192 194
193 static void WriteFactories(SkWStream* stream, const SkFactorySet& rec); 195 static void WriteFactories(SkWStream* stream, const SkFactorySet& rec);
194 static void WriteTypefaces(SkWStream* stream, const SkRefCntSet& rec); 196 static void WriteTypefaces(SkWStream* stream, const SkRefCntSet& rec);
195 197
196 void initForPlayback() const; 198 void initForPlayback() const;
197 }; 199 };
198 200
199 #endif 201 #endif
OLDNEW
« no previous file with comments | « src/core/SkPicture.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698