Remove misleading comments that implied big-endian support in Skia.

Additional minor cleanup:
- Removed temporary #define that was no longer in service.

Change-Id: Ib444ed4d4a5c0959d0b8642da676eb2b3db41b22
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291897
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This commit is contained in:
John Stiles 2020-05-27 14:12:26 -04:00 committed by Skia Commit-Bot
parent 2dd272bf15
commit 9f987c336f
2 changed files with 6 additions and 17 deletions

View File

@ -55,17 +55,11 @@ static inline bool SkAlphaTypeIsOpaque(SkAlphaType at) {
///////////////////////////////////////////////////////////////////////////////
/** Temporary macro that allows us to add new color types without breaking Chrome compile. */
#define SK_EXTENDED_COLOR_TYPES
/** \enum SkImageInfo::SkColorType
Describes how pixel bits encode color. A pixel may be an alpha mask, a
grayscale, RGB, or ARGB.
Describes how pixel bits encode color. A pixel may be an alpha mask, a grayscale, RGB, or ARGB.
kN32_SkColorType selects the native 32-bit ARGB format. On little endian
processors, pixels containing 8-bit ARGB components pack into 32-bit
kBGRA_8888_SkColorType. On big endian processors, pixels pack into 32-bit
kRGBA_8888_SkColorType.
kN32_SkColorType selects the native 32-bit ARGB format for the current configuration. This can
lead to inconsistent results across platforms, so use with caution.
*/
enum SkColorType {
kUnknown_SkColorType, //!< uninitialized
@ -97,10 +91,10 @@ enum SkColorType {
kLastEnum_SkColorType = kR16G16B16A16_unorm_SkColorType, //!< last valid value
#if SK_PMCOLOR_BYTE_ORDER(B,G,R,A)
kN32_SkColorType = kBGRA_8888_SkColorType,//!< native ARGB 32-bit encoding
kN32_SkColorType = kBGRA_8888_SkColorType,//!< native 32-bit BGRA encoding
#elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A)
kN32_SkColorType = kRGBA_8888_SkColorType,//!< native ARGB 32-bit encoding
kN32_SkColorType = kRGBA_8888_SkColorType,//!< native 32-bit RGBA encoding
#else
#error "SK_*32_SHIFT values must correspond to BGRA or RGBA byte order"

View File

@ -325,12 +325,7 @@
/**
* SK_PMCOLOR_BYTE_ORDER can be used to query the byte order of SkPMColor at compile time. The
* relationship between the byte order and shift values depends on machine endianness. If the shift
* order is R=0, G=8, B=16, A=24 then ((char*)&pmcolor)[0] will produce the R channel on a little
* endian machine and the A channel on a big endian machine. Thus, given those shifts values,
* SK_PMCOLOR_BYTE_ORDER(R,G,B,A) will be true on a little endian machine and
* SK_PMCOLOR_BYTE_ORDER(A,B,G,R) will be true on a big endian machine.
* SK_PMCOLOR_BYTE_ORDER can be used to query the byte order of SkPMColor at compile time.
*/
#ifdef SK_CPU_BENDIAN
# define SK_PMCOLOR_BYTE_ORDER(C0, C1, C2, C3) \