Skia
2D Graphics Library
|
#include "include/core/SkAlphaType.h"
#include "include/core/SkColorType.h"
#include "include/core/SkRect.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkSize.h"
#include "include/private/base/SkAPI.h"
#include "include/private/base/SkDebug.h"
#include "include/private/base/SkMath.h"
#include "include/private/base/SkTFitsIn.h"
#include <cstddef>
#include <cstdint>
#include <utility>
Go to the source code of this file.
Classes | |
struct | SkColorInfo |
Describes pixel and encoding. More... | |
struct | SkImageInfo |
Describes pixel dimensions and encoding. More... | |
Enumerations | |
enum | SkYUVColorSpace : int { kJPEG_Full_SkYUVColorSpace , kRec601_Limited_SkYUVColorSpace , kRec709_Full_SkYUVColorSpace , kRec709_Limited_SkYUVColorSpace , kBT2020_8bit_Full_SkYUVColorSpace , kBT2020_8bit_Limited_SkYUVColorSpace , kBT2020_10bit_Full_SkYUVColorSpace , kBT2020_10bit_Limited_SkYUVColorSpace , kBT2020_12bit_Full_SkYUVColorSpace , kBT2020_12bit_Limited_SkYUVColorSpace , kIdentity_SkYUVColorSpace , kLastEnum_SkYUVColorSpace = kIdentity_SkYUVColorSpace , kJPEG_SkYUVColorSpace = kJPEG_Full_SkYUVColorSpace , kRec601_SkYUVColorSpace = kRec601_Limited_SkYUVColorSpace , kRec709_SkYUVColorSpace = kRec709_Limited_SkYUVColorSpace , kBT2020_SkYUVColorSpace = kBT2020_8bit_Limited_SkYUVColorSpace } |
Functions | |
SK_API int | SkColorTypeBytesPerPixel (SkColorType ct) |
Returns the number of bytes required to store a pixel, including unused padding. More... | |
SK_API bool | SkColorTypeIsAlwaysOpaque (SkColorType ct) |
Returns true if SkColorType always decodes alpha to 1.0, making the pixel fully opaque. More... | |
SK_API bool | SkColorTypeValidateAlphaType (SkColorType colorType, SkAlphaType alphaType, SkAlphaType *canonical=nullptr) |
Returns true if canonical can be set to a valid SkAlphaType for colorType. More... | |
enum SkYUVColorSpace : int |
SK_API 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.
SK_API 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.
SK_API 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 |