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

Side by Side Diff: include/core/SkPicture.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 | « 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 /** Return the approximate number of operations in this picture. This
201 * number may be greater or less than the number of SkCanvas calls
202 * recorded: some calls may be recorded as more than one operation, or some
203 * calls may be optimized away.
204 */
205 int approximateOpCount() const;
206
200 private: 207 private:
201 // V2 : adds SkPixelRef's generation ID. 208 // V2 : adds SkPixelRef's generation ID.
202 // V3 : PictInfo tag at beginning, and EOF tag at the end 209 // V3 : PictInfo tag at beginning, and EOF tag at the end
203 // V4 : move SkPictInfo to be the header 210 // V4 : move SkPictInfo to be the header
204 // V5 : don't read/write FunctionPtr on cross-process (we can detect that) 211 // 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 ) 212 // V6 : added serialization of SkPath's bounds (and packed its flags tighter )
206 // V7 : changed drawBitmapRect(IRect) to drawBitmapRectToRect(Rect) 213 // V7 : changed drawBitmapRect(IRect) to drawBitmapRectToRect(Rect)
207 // V8 : Add an option for encoding bitmaps 214 // V8 : Add an option for encoding bitmaps
208 // V9 : Allow the reader and writer of an SKP disagree on whether to support 215 // V9 : Allow the reader and writer of an SKP disagree on whether to support
209 // SK_SUPPORT_HINTING_SCALE_FACTOR 216 // SK_SUPPORT_HINTING_SCALE_FACTOR
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 298
292 // Takes ownership of the SkRecord, refs the (optional) BBH. 299 // Takes ownership of the SkRecord, refs the (optional) BBH.
293 SkPicture(int width, int height, SkRecord*, SkBBoxHierarchy*); 300 SkPicture(int width, int height, SkRecord*, SkBBoxHierarchy*);
294 301
295 SkAutoTDelete<SkRecord> fRecord; 302 SkAutoTDelete<SkRecord> fRecord;
296 SkAutoTUnref<SkBBoxHierarchy> fBBH; 303 SkAutoTUnref<SkBBoxHierarchy> fBBH;
297 bool fRecordWillPlayBackBitmaps; // TODO: const 304 bool fRecordWillPlayBackBitmaps; // TODO: const
298 }; 305 };
299 306
300 #endif 307 #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