| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 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 SkImageInfo_DEFINED | 8 #ifndef SkImageInfo_DEFINED |
| 9 #define SkImageInfo_DEFINED | 9 #define SkImageInfo_DEFINED |
| 10 | 10 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 kBGRA_8888_SkColorType, | 82 kBGRA_8888_SkColorType, |
| 83 kIndex_8_SkColorType, | 83 kIndex_8_SkColorType, |
| 84 | 84 |
| 85 kLastEnum_SkColorType = kIndex_8_SkColorType, | 85 kLastEnum_SkColorType = kIndex_8_SkColorType, |
| 86 | 86 |
| 87 #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A) | 87 #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A) |
| 88 kN32_SkColorType = kBGRA_8888_SkColorType, | 88 kN32_SkColorType = kBGRA_8888_SkColorType, |
| 89 #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) | 89 #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) |
| 90 kN32_SkColorType = kRGBA_8888_SkColorType, | 90 kN32_SkColorType = kRGBA_8888_SkColorType, |
| 91 #else | 91 #else |
| 92 #error "SK_*32_SHFIT values must correspond to BGRA or RGBA byte order" | 92 #error "SK_*32_SHFIT values must correspond to BGRA or RGBA byte order" |
| 93 #endif | |
| 94 | |
| 95 #ifdef SK_SUPPORT_LEGACY_N32_NAME | |
| 96 kPMColor_SkColorType = kN32_SkColorType | |
| 97 #endif | 93 #endif |
| 98 }; | 94 }; |
| 99 | 95 |
| 100 static int SkColorTypeBytesPerPixel(SkColorType ct) { | 96 static int SkColorTypeBytesPerPixel(SkColorType ct) { |
| 101 static const uint8_t gSize[] = { | 97 static const uint8_t gSize[] = { |
| 102 0, // Unknown | 98 0, // Unknown |
| 103 1, // Alpha_8 | 99 1, // Alpha_8 |
| 104 2, // RGB_565 | 100 2, // RGB_565 |
| 105 2, // ARGB_4444 | 101 2, // ARGB_4444 |
| 106 4, // RGBA_8888 | 102 4, // RGBA_8888 |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 , fHeight(height) | 298 , fHeight(height) |
| 303 , fColorType(ct) | 299 , fColorType(ct) |
| 304 , fAlphaType(at) | 300 , fAlphaType(at) |
| 305 , fProfileType(pt) | 301 , fProfileType(pt) |
| 306 {} | 302 {} |
| 307 | 303 |
| 308 SkColorProfileType fProfileType; | 304 SkColorProfileType fProfileType; |
| 309 }; | 305 }; |
| 310 | 306 |
| 311 #endif | 307 #endif |
| OLD | NEW |