| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 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 SkBitmap_DEFINED | 8 #ifndef SkBitmap_DEFINED |
| 9 #define SkBitmap_DEFINED | 9 #define SkBitmap_DEFINED |
| 10 | 10 |
| (...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 | 746 |
| 747 uint8_t fFlags; | 747 uint8_t fFlags; |
| 748 | 748 |
| 749 void internalErase(const SkIRect&, U8CPU a, U8CPU r, U8CPU g, U8CPU b)const; | 749 void internalErase(const SkIRect&, U8CPU a, U8CPU r, U8CPU g, U8CPU b)const; |
| 750 | 750 |
| 751 /* Unreference any pixelrefs or colortables | 751 /* Unreference any pixelrefs or colortables |
| 752 */ | 752 */ |
| 753 void freePixels(); | 753 void freePixels(); |
| 754 void updatePixelsFromRef() const; | 754 void updatePixelsFromRef() const; |
| 755 | 755 |
| 756 void legacyUnflatten(SkReadBuffer&); | |
| 757 | |
| 758 static void WriteRawPixels(SkWriteBuffer*, const SkBitmap&); | 756 static void WriteRawPixels(SkWriteBuffer*, const SkBitmap&); |
| 759 static bool ReadRawPixels(SkReadBuffer*, SkBitmap*); | 757 static bool ReadRawPixels(SkReadBuffer*, SkBitmap*); |
| 760 | 758 |
| 761 friend class SkBitmapSource; // unflatten | 759 friend class SkBitmapSource; // unflatten |
| 762 friend class SkReadBuffer; // unflatten, rawpixels | 760 friend class SkReadBuffer; // unflatten, rawpixels |
| 763 friend class SkWriteBuffer; // rawpixels | 761 friend class SkWriteBuffer; // rawpixels |
| 764 friend struct SkBitmapProcState; | 762 friend struct SkBitmapProcState; |
| 765 }; | 763 }; |
| 766 | 764 |
| 767 class SkAutoLockPixels : SkNoncopyable { | 765 class SkAutoLockPixels : SkNoncopyable { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 | 808 |
| 811 inline SkPMColor SkBitmap::getIndex8Color(int x, int y) const { | 809 inline SkPMColor SkBitmap::getIndex8Color(int x, int y) const { |
| 812 SkASSERT(fPixels); | 810 SkASSERT(fPixels); |
| 813 SkASSERT(kIndex_8_SkColorType == this->colorType()); | 811 SkASSERT(kIndex_8_SkColorType == this->colorType()); |
| 814 SkASSERT((unsigned)x < (unsigned)this->width() && (unsigned)y < (unsigned)th
is->height()); | 812 SkASSERT((unsigned)x < (unsigned)this->width() && (unsigned)y < (unsigned)th
is->height()); |
| 815 SkASSERT(fColorTable); | 813 SkASSERT(fColorTable); |
| 816 return (*fColorTable)[*((const uint8_t*)fPixels + y * fRowBytes + x)]; | 814 return (*fColorTable)[*((const uint8_t*)fPixels + y * fRowBytes + x)]; |
| 817 } | 815 } |
| 818 | 816 |
| 819 #endif | 817 #endif |
| OLD | NEW |