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

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

Issue 464263004: expose api to count the number of ops in a picture (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: move to SkPicture.h 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 #endif 76 #endif
77 SkPictureData(const SkPictureRecord& record, const SkPictInfo&, bool deepCop yOps); 77 SkPictureData(const SkPictureRecord& record, const SkPictInfo&, bool deepCop yOps);
78 static SkPictureData* CreateFromStream(SkStream*, 78 static SkPictureData* CreateFromStream(SkStream*,
79 const SkPictInfo&, 79 const SkPictInfo&,
80 SkPicture::InstallPixelRefProc); 80 SkPicture::InstallPixelRefProc);
81 static SkPictureData* CreateFromBuffer(SkReadBuffer&, const SkPictInfo&); 81 static SkPictureData* CreateFromBuffer(SkReadBuffer&, const SkPictInfo&);
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 int countOps() const { return fContentInfo.numOperations(); }
86 87
87 void serialize(SkWStream*, SkPicture::EncodeBitmap) const; 88 void serialize(SkWStream*, SkPicture::EncodeBitmap) const;
88 void flatten(SkWriteBuffer&) const; 89 void flatten(SkWriteBuffer&) const;
89 90
90 bool containsBitmaps() const; 91 bool containsBitmaps() const;
91 92
92 const SkData* opData() const { return fOpData; } 93 const SkData* opData() const { return fOpData; }
93 94
94 protected: 95 protected:
95 explicit SkPictureData(const SkPictInfo& info); 96 explicit SkPictureData(const SkPictInfo& info);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 191
191 const SkPictInfo fInfo; 192 const SkPictInfo fInfo;
192 193
193 static void WriteFactories(SkWStream* stream, const SkFactorySet& rec); 194 static void WriteFactories(SkWStream* stream, const SkFactorySet& rec);
194 static void WriteTypefaces(SkWStream* stream, const SkRefCntSet& rec); 195 static void WriteTypefaces(SkWStream* stream, const SkRefCntSet& rec);
195 196
196 void initForPlayback() const; 197 void initForPlayback() const;
197 }; 198 };
198 199
199 #endif 200 #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