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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 } | 890 } |
891 | 891 |
892 inline SkPMColor SkBitmap::getIndex8Color(int x, int y) const { | 892 inline SkPMColor SkBitmap::getIndex8Color(int x, int y) const { |
893 SkASSERT(fPixels); | 893 SkASSERT(fPixels); |
894 SkASSERT(this->config() == kIndex8_Config); | 894 SkASSERT(this->config() == kIndex8_Config); |
895 SkASSERT((unsigned)x < (unsigned)this->width() && (unsigned)y < (unsigned)th
is->height()); | 895 SkASSERT((unsigned)x < (unsigned)this->width() && (unsigned)y < (unsigned)th
is->height()); |
896 SkASSERT(fColorTable); | 896 SkASSERT(fColorTable); |
897 return (*fColorTable)[*((const uint8_t*)fPixels + y * fRowBytes + x)]; | 897 return (*fColorTable)[*((const uint8_t*)fPixels + y * fRowBytes + x)]; |
898 } | 898 } |
899 | 899 |
| 900 /////////////////////////////////////////////////////////////////////////////// |
| 901 // |
| 902 // Helpers until we can fully deprecate SkBitmap::Config |
| 903 // |
| 904 extern SkBitmap::Config SkColorTypeToBitmapConfig(SkColorType); |
| 905 extern SkColorType SkBitmapConfigToColorType(SkBitmap::Config); |
| 906 |
900 #endif | 907 #endif |
OLD | NEW |