Flutter Engine
The Flutter Engine
|
#include "include/core/SkImageInfo.h"
#include "include/core/SkColor.h"
#include "include/core/SkColorSpace.h"
#include "include/private/base/SkAssert.h"
#include "src/base/SkSafeMath.h"
#include "src/core/SkImageInfoPriv.h"
Go to the source code of this file.
Functions | |
int | SkColorTypeBytesPerPixel (SkColorType ct) |
bool | SkColorTypeIsAlwaysOpaque (SkColorType ct) |
bool | SkColorTypeValidateAlphaType (SkColorType colorType, SkAlphaType alphaType, SkAlphaType *canonical) |
int SkColorTypeBytesPerPixel | ( | SkColorType | ct | ) |
Returns the number of bytes required to store a pixel, including unused padding. Returns zero if ct is kUnknown_SkColorType or invalid.
Definition at line 16 of file SkImageInfo.cpp.
bool SkColorTypeIsAlwaysOpaque | ( | SkColorType | ct | ) |
Returns true if SkColorType always decodes alpha to 1.0, making the pixel fully opaque. If true, SkColorType does not reserve bits to encode alpha.
Definition at line 48 of file SkImageInfo.cpp.
bool SkColorTypeValidateAlphaType | ( | SkColorType | colorType, |
SkAlphaType | alphaType, | ||
SkAlphaType * | canonical = nullptr |
||
) |
Returns true if canonical can be set to a valid SkAlphaType for colorType. If there is more than one valid canonical SkAlphaType, set to alphaType, if valid. If true is returned and canonical is not nullptr, store valid SkAlphaType.
Returns false only if alphaType is kUnknown_SkAlphaType, color type is not kUnknown_SkColorType, and SkColorType is not always opaque. If false is returned, canonical is ignored.
canonical | storage for SkAlphaType |
Definition at line 194 of file SkImageInfo.cpp.