| 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 |
| 11 #include "SkBitmap.h" | 11 #include "SkBitmap.h" |
| 12 #include "SkDynamicAnnotations.h" | |
| 13 #include "SkRefCnt.h" | 12 #include "SkRefCnt.h" |
| 14 #include "SkString.h" | 13 #include "SkString.h" |
| 15 #include "SkFlattenable.h" | 14 #include "SkFlattenable.h" |
| 16 #include "SkImageInfo.h" | 15 #include "SkImageInfo.h" |
| 17 #include "SkTDArray.h" | 16 #include "SkTDArray.h" |
| 18 | 17 |
| 19 //#define xed | 18 //#define xed |
| 20 | 19 |
| 21 #ifdef SK_DEBUG | 20 #ifdef SK_DEBUG |
| 22 /** | 21 /** |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 private: | 342 private: |
| 344 SkBaseMutex* fMutex; // must remain in scope for the life of this object | 343 SkBaseMutex* fMutex; // must remain in scope for the life of this object |
| 345 | 344 |
| 346 // mostly const. fInfo.fAlpahType can be changed at runtime. | 345 // mostly const. fInfo.fAlpahType can be changed at runtime. |
| 347 const SkImageInfo fInfo; | 346 const SkImageInfo fInfo; |
| 348 | 347 |
| 349 // LockRec is only valid if we're in a locked state (isLocked()) | 348 // LockRec is only valid if we're in a locked state (isLocked()) |
| 350 LockRec fRec; | 349 LockRec fRec; |
| 351 int fLockCount; | 350 int fLockCount; |
| 352 | 351 |
| 353 mutable SkTRacy<uint32_t> fGenerationID; | 352 mutable uint32_t fGenerationID; |
| 354 mutable SkTRacy<bool> fUniqueGenerationID; | 353 mutable bool fUniqueGenerationID; |
| 355 | 354 |
| 356 SkTDArray<GenIDChangeListener*> fGenIDChangeListeners; // pointers are owne
d | 355 SkTDArray<GenIDChangeListener*> fGenIDChangeListeners; // pointers are owne
d |
| 357 | 356 |
| 358 SkString fURI; | 357 SkString fURI; |
| 359 | 358 |
| 360 // can go from false to true, but never from true to false | 359 // can go from false to true, but never from true to false |
| 361 bool fIsImmutable; | 360 bool fIsImmutable; |
| 362 // only ever set in constructor, const after that | 361 // only ever set in constructor, const after that |
| 363 bool fPreLocked; | 362 bool fPreLocked; |
| 364 | 363 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 384 /** | 383 /** |
| 385 * Allocate a new pixelref matching the specified ImageInfo, allocating | 384 * Allocate a new pixelref matching the specified ImageInfo, allocating |
| 386 * the memory for the pixels. If the ImageInfo requires a ColorTable, | 385 * the memory for the pixels. If the ImageInfo requires a ColorTable, |
| 387 * the pixelref will ref() the colortable. | 386 * the pixelref will ref() the colortable. |
| 388 * On failure return NULL. | 387 * On failure return NULL. |
| 389 */ | 388 */ |
| 390 virtual SkPixelRef* create(const SkImageInfo&, size_t rowBytes, SkColorTable
*) = 0; | 389 virtual SkPixelRef* create(const SkImageInfo&, size_t rowBytes, SkColorTable
*) = 0; |
| 391 }; | 390 }; |
| 392 | 391 |
| 393 #endif | 392 #endif |
| OLD | NEW |