8#ifndef SkEncodedInfo_DEFINED
9#define SkEncodedInfo_DEFINED
198 int width()
const {
return fWidth; }
204 if (!fProfile)
return nullptr;
205 return fProfile->profile();
208 if (!fProfile)
return nullptr;
209 return fProfile->data();
217 return fBitsPerComponent;
220 return 2 * fBitsPerComponent;
222 return fBitsPerComponent;
227 return 3 * fBitsPerComponent;
234 return 4 * fBitsPerComponent;
250 fWidth, fHeight, fColor, fAlpha, fBitsPerComponent,
nullptr, fColorDepth);
252 copy.fProfile = std::make_unique<ICCProfile>(*fProfile);
270 , fColorDepth(colorDepth)
278 uint8_t fBitsPerComponent;
280 std::unique_ptr<ICCProfile> fProfile;
@ kOpaque_SkAlphaType
pixel is opaque
@ kAlpha_8_SkColorType
pixel with alpha in 8-bit byte
@ kGray_8_SkColorType
pixel with grayscale level in 8-bit byte
@ kRGB_565_SkColorType
pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
constexpr uint8_t SkToU8(S x)
static sk_sp< SkColorSpace > MakeSRGB()
static sk_sp< SkColorSpace > Make(const skcms_ICCProfile &)
const skcms_ICCProfile * profile() const
sk_sp< SkData > data() const
static std::unique_ptr< ICCProfile > Make(sk_sp< SkData >)
sk_sp< SkData > profileData() const
static SkEncodedInfo Make(int width, int height, Color color, Alpha alpha, int bitsPerComponent, std::unique_ptr< ICCProfile > profile)
SkEncodedInfo & operator=(SkEncodedInfo &&)=default
SkImageInfo makeImageInfo() const
SkEncodedInfo & operator=(const SkEncodedInfo &)=delete
uint8_t bitsPerPixel() const
SkEncodedInfo copy() const
SkEncodedInfo(const SkEncodedInfo &orig)=delete
const skcms_ICCProfile * profile() const
static SkEncodedInfo Make(int width, int height, Color color, Alpha alpha, int bitsPerComponent, std::unique_ptr< ICCProfile > profile, int colorDepth)
uint8_t getColorDepth() const
uint8_t bitsPerComponent() const
SkEncodedInfo(SkEncodedInfo &&orig)=default
static SkEncodedInfo Make(int width, int height, Color color, Alpha alpha, int bitsPerComponent)
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)