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

Side by Side Diff: include/core/SkPicture.h

Issue 753903002: use int instead of size_t to match skia convention (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 | 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 /* 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 */ 195 */
196 int approximateOpCount() const; 196 int approximateOpCount() const;
197 197
198 /** Return true if this picture contains text. 198 /** Return true if this picture contains text.
199 */ 199 */
200 bool hasText() const; 200 bool hasText() const;
201 201
202 // An array of refcounted const SkPicture pointers. 202 // An array of refcounted const SkPicture pointers.
203 class SnapshotArray : ::SkNoncopyable { 203 class SnapshotArray : ::SkNoncopyable {
204 public: 204 public:
205 SnapshotArray(const SkPicture* pics[], size_t count) : fPics(pics), fCou nt(count) {} 205 SnapshotArray(const SkPicture* pics[], int count) : fPics(pics), fCount( count) {}
206 ~SnapshotArray() { for (size_t i = 0; i < fCount; i++) { fPics[i]->unref (); } } 206 ~SnapshotArray() { for (int i = 0; i < fCount; i++) { fPics[i]->unref(); } }
207 207
208 const SkPicture* const* begin() const { return fPics; } 208 const SkPicture* const* begin() const { return fPics; }
209 size_t count() const { return fCount; } 209 int count() const { return fCount; }
210 private: 210 private:
211 SkAutoTMalloc<const SkPicture*> fPics; 211 SkAutoTMalloc<const SkPicture*> fPics;
212 size_t fCount; 212 int fCount;
213 }; 213 };
214 214
215 private: 215 private:
216 // V2 : adds SkPixelRef's generation ID. 216 // V2 : adds SkPixelRef's generation ID.
217 // V3 : PictInfo tag at beginning, and EOF tag at the end 217 // V3 : PictInfo tag at beginning, and EOF tag at the end
218 // V4 : move SkPictInfo to be the header 218 // V4 : move SkPictInfo to be the header
219 // V5 : don't read/write FunctionPtr on cross-process (we can detect that) 219 // V5 : don't read/write FunctionPtr on cross-process (we can detect that)
220 // V6 : added serialization of SkPath's bounds (and packed its flags tighter ) 220 // V6 : added serialization of SkPath's bounds (and packed its flags tighter )
221 // V7 : changed drawBitmapRect(IRect) to drawBitmapRectToRect(Rect) 221 // V7 : changed drawBitmapRect(IRect) to drawBitmapRectToRect(Rect)
222 // V8 : Add an option for encoding bitmaps 222 // V8 : Add an option for encoding bitmaps
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 } fAnalysis; 303 } fAnalysis;
304 304
305 friend class SkPictureRecorder; // SkRecord-based constructor. 305 friend class SkPictureRecorder; // SkRecord-based constructor.
306 friend class GrLayerHoister; // access to fRecord 306 friend class GrLayerHoister; // access to fRecord
307 friend class ReplaceDraw; 307 friend class ReplaceDraw;
308 friend class SkPictureUtils; 308 friend class SkPictureUtils;
309 }; 309 };
310 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize); 310 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize);
311 311
312 #endif 312 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698