| OLD | NEW |
| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 /** Return the pixel memory returned from lockPixels, or null if the | 63 /** Return the pixel memory returned from lockPixels, or null if the |
| 64 lockCount is 0. | 64 lockCount is 0. |
| 65 */ | 65 */ |
| 66 void* pixels() const { return fRec.fPixels; } | 66 void* pixels() const { return fRec.fPixels; } |
| 67 | 67 |
| 68 /** Return the current colorTable (if any) if pixels are locked, or null. | 68 /** Return the current colorTable (if any) if pixels are locked, or null. |
| 69 */ | 69 */ |
| 70 SkColorTable* colorTable() const { return fRec.fColorTable; } | 70 SkColorTable* colorTable() const { return fRec.fColorTable; } |
| 71 | 71 |
| 72 size_t rowBytes() const { return fRec.fRowBytes; } |
| 73 |
| 72 /** | 74 /** |
| 73 * To access the actual pixels of a pixelref, it must be "locked". | 75 * To access the actual pixels of a pixelref, it must be "locked". |
| 74 * Calling lockPixels returns a LockRec struct (on success). | 76 * Calling lockPixels returns a LockRec struct (on success). |
| 75 */ | 77 */ |
| 76 struct LockRec { | 78 struct LockRec { |
| 77 void* fPixels; | 79 void* fPixels; |
| 78 SkColorTable* fColorTable; | 80 SkColorTable* fColorTable; |
| 79 size_t fRowBytes; | 81 size_t fRowBytes; |
| 80 | 82 |
| 81 void zero() { sk_bzero(this, sizeof(*this)); } | 83 void zero() { sk_bzero(this, sizeof(*this)); } |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 | 358 |
| 357 // When copying a bitmap to another with the same shape and config, we can s
afely | 359 // When copying a bitmap to another with the same shape and config, we can s
afely |
| 358 // clone the pixelref generation ID too, which makes them equivalent under c
aching. | 360 // clone the pixelref generation ID too, which makes them equivalent under c
aching. |
| 359 friend class SkBitmap; // only for cloneGenID | 361 friend class SkBitmap; // only for cloneGenID |
| 360 void cloneGenID(const SkPixelRef&); | 362 void cloneGenID(const SkPixelRef&); |
| 361 | 363 |
| 362 typedef SkFlattenable INHERITED; | 364 typedef SkFlattenable INHERITED; |
| 363 }; | 365 }; |
| 364 | 366 |
| 365 #endif | 367 #endif |
| OLD | NEW |