OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2008 The Android Open Source Project | 2 * Copyright 2008 The Android Open Source Project |
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 SkPixelRef_DEFINED | 8 #ifndef SkPixelRef_DEFINED |
9 #define SkPixelRef_DEFINED | 9 #define SkPixelRef_DEFINED |
10 | 10 |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 private: | 346 private: |
347 SkBaseMutex* fMutex; // must remain in scope for the life of this object | 347 SkBaseMutex* fMutex; // must remain in scope for the life of this object |
348 | 348 |
349 // mostly const. fInfo.fAlpahType can be changed at runtime. | 349 // mostly const. fInfo.fAlpahType can be changed at runtime. |
350 const SkImageInfo fInfo; | 350 const SkImageInfo fInfo; |
351 | 351 |
352 // LockRec is only valid if we're in a locked state (isLocked()) | 352 // LockRec is only valid if we're in a locked state (isLocked()) |
353 LockRec fRec; | 353 LockRec fRec; |
354 int fLockCount; | 354 int fLockCount; |
355 | 355 |
356 mutable uint32_t fGenerationID; | 356 mutable SkTRacy<uint32_t> fGenerationID; |
357 mutable bool fUniqueGenerationID; | 357 mutable SkTRacy<bool> fUniqueGenerationID; |
358 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK | 358 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
359 const uint32_t fStableID; | 359 const uint32_t fStableID; |
360 #endif | 360 #endif |
361 | 361 |
362 SkTDArray<GenIDChangeListener*> fGenIDChangeListeners; // pointers are owne
d | 362 SkTDArray<GenIDChangeListener*> fGenIDChangeListeners; // pointers are owne
d |
363 | 363 |
364 SkString fURI; | 364 SkString fURI; |
365 | 365 |
366 // can go from false to true, but never from true to false | 366 // can go from false to true, but never from true to false |
367 bool fIsImmutable; | 367 bool fIsImmutable; |
(...skipping 18 matching lines...) Expand all Loading... |
386 /** | 386 /** |
387 * Allocate a new pixelref matching the specified ImageInfo, allocating | 387 * Allocate a new pixelref matching the specified ImageInfo, allocating |
388 * the memory for the pixels. If the ImageInfo requires a ColorTable, | 388 * the memory for the pixels. If the ImageInfo requires a ColorTable, |
389 * the pixelref will ref() the colortable. | 389 * the pixelref will ref() the colortable. |
390 * On failure return NULL. | 390 * On failure return NULL. |
391 */ | 391 */ |
392 virtual SkPixelRef* create(const SkImageInfo&, size_t rowBytes, SkColorTable
*) = 0; | 392 virtual SkPixelRef* create(const SkImageInfo&, size_t rowBytes, SkColorTable
*) = 0; |
393 }; | 393 }; |
394 | 394 |
395 #endif | 395 #endif |
OLD | NEW |