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

Side by Side Diff: include/core/SkPicture.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 | « no previous file | src/core/SkPicture.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 /* 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 #endif 190 #endif
191 191
192 class DeletionListener : public SkRefCnt { 192 class DeletionListener : public SkRefCnt {
193 public: 193 public:
194 virtual void onDeletion(uint32_t pictureID) = 0; 194 virtual void onDeletion(uint32_t pictureID) = 0;
195 }; 195 };
196 196
197 // Takes ref on listener. 197 // Takes ref on listener.
198 void addDeletionListener(DeletionListener* listener) const; 198 void addDeletionListener(DeletionListener* listener) const;
199 199
200 /**
201 * Return the approximate number of "operations" in the picture. This numbe r is hard to nail
202 * down precisely, since there is not always a 1-to-1 correspondence betwee n "operations" in
203 * the internal format, and public API calls on SkCanvas. It is also possib le that the value
204 * returned may chage, as deferred optimizations may vary the count.
205 */
206 int countOps() const;
207
200 private: 208 private:
201 // V2 : adds SkPixelRef's generation ID. 209 // V2 : adds SkPixelRef's generation ID.
202 // V3 : PictInfo tag at beginning, and EOF tag at the end 210 // V3 : PictInfo tag at beginning, and EOF tag at the end
203 // V4 : move SkPictInfo to be the header 211 // V4 : move SkPictInfo to be the header
204 // V5 : don't read/write FunctionPtr on cross-process (we can detect that) 212 // V5 : don't read/write FunctionPtr on cross-process (we can detect that)
205 // V6 : added serialization of SkPath's bounds (and packed its flags tighter ) 213 // V6 : added serialization of SkPath's bounds (and packed its flags tighter )
206 // V7 : changed drawBitmapRect(IRect) to drawBitmapRectToRect(Rect) 214 // V7 : changed drawBitmapRect(IRect) to drawBitmapRectToRect(Rect)
207 // V8 : Add an option for encoding bitmaps 215 // V8 : Add an option for encoding bitmaps
208 // V9 : Allow the reader and writer of an SKP disagree on whether to support 216 // V9 : Allow the reader and writer of an SKP disagree on whether to support
209 // SK_SUPPORT_HINTING_SCALE_FACTOR 217 // SK_SUPPORT_HINTING_SCALE_FACTOR
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 299
292 // Takes ownership of the SkRecord, refs the (optional) BBH. 300 // Takes ownership of the SkRecord, refs the (optional) BBH.
293 SkPicture(int width, int height, SkRecord*, SkBBoxHierarchy*); 301 SkPicture(int width, int height, SkRecord*, SkBBoxHierarchy*);
294 302
295 SkAutoTDelete<SkRecord> fRecord; 303 SkAutoTDelete<SkRecord> fRecord;
296 SkAutoTUnref<SkBBoxHierarchy> fBBH; 304 SkAutoTUnref<SkBBoxHierarchy> fBBH;
297 bool fRecordWillPlayBackBitmaps; // TODO: const 305 bool fRecordWillPlayBackBitmaps; // TODO: const
298 }; 306 };
299 307
300 #endif 308 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkPicture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698