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

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

Issue 110843006: Initialize SkPixelRef::fInfo. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Add note to make const. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/core/SkPixelRef.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 2008 The Android Open Source Project 3 * Copyright 2008 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 SkPixelRef_DEFINED 10 #ifndef SkPixelRef_DEFINED
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 SkPixelRef(SkFlattenableReadBuffer&, SkBaseMutex*); 288 SkPixelRef(SkFlattenableReadBuffer&, SkBaseMutex*);
289 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; 289 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
290 290
291 // only call from constructor. Flags this to always be locked, removing 291 // only call from constructor. Flags this to always be locked, removing
292 // the need to grab the mutex and call onLockPixels/onUnlockPixels. 292 // the need to grab the mutex and call onLockPixels/onUnlockPixels.
293 // Performance tweak to avoid those calls (esp. in multi-thread use case). 293 // Performance tweak to avoid those calls (esp. in multi-thread use case).
294 void setPreLocked(void* pixels, SkColorTable* ctable); 294 void setPreLocked(void* pixels, SkColorTable* ctable);
295 295
296 private: 296 private:
297 SkBaseMutex* fMutex; // must remain in scope for the life of this object 297 SkBaseMutex* fMutex; // must remain in scope for the life of this object
298 // FIXME: fInfo should be const once we remove old constructor that does
299 // not set it.
298 SkImageInfo fInfo; 300 SkImageInfo fInfo;
299 301
300 void* fPixels; 302 void* fPixels;
301 SkColorTable* fColorTable; // we do not track ownership, subclass does 303 SkColorTable* fColorTable; // we do not track ownership, subclass does
302 int fLockCount; 304 int fLockCount;
303 305
304 mutable uint32_t fGenerationID; 306 mutable uint32_t fGenerationID;
305 mutable bool fUniqueGenerationID; 307 mutable bool fUniqueGenerationID;
306 308
307 SkTDArray<GenIDChangeListener*> fGenIDChangeListeners; // pointers are owne d 309 SkTDArray<GenIDChangeListener*> fGenIDChangeListeners; // pointers are owne d
(...skipping 12 matching lines...) Expand all
320 322
321 // When copying a bitmap to another with the same shape and config, we can s afely 323 // When copying a bitmap to another with the same shape and config, we can s afely
322 // clone the pixelref generation ID too, which makes them equivalent under c aching. 324 // clone the pixelref generation ID too, which makes them equivalent under c aching.
323 friend class SkBitmap; // only for cloneGenID 325 friend class SkBitmap; // only for cloneGenID
324 void cloneGenID(const SkPixelRef&); 326 void cloneGenID(const SkPixelRef&);
325 327
326 typedef SkFlattenable INHERITED; 328 typedef SkFlattenable INHERITED;
327 }; 329 };
328 330
329 #endif 331 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698