diff options
author | Brian Salomon <bsalomon@google.com> | 2018-05-24 09:54:56 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-05-24 14:14:43 +0000 |
commit | 75bf216c033896ffeff5176e8b5f5fb79c02f8fb (patch) | |
tree | 101a9fa263391856fe7a296bcdb16dbbbeb52d9f /src | |
parent | 90f050387a5851943910f91dce2c01babf0d3896 (diff) |
Move SkYUVAIndex and SkImageSourceChannel to SkImageInfoPriv.h until used in public API
Change-Id: Ib75be2b6e9eb9b80f1f9e738bc8e3300ddc08f22
Reviewed-on: https://skia-review.googlesource.com/129927
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkImagePriv.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/core/SkImagePriv.h b/src/core/SkImagePriv.h index b0bc85efaf..7848bf4035 100644 --- a/src/core/SkImagePriv.h +++ b/src/core/SkImagePriv.h @@ -83,4 +83,40 @@ void SkImage_unpinAsTexture(const SkImage*, GrContext*); */ sk_sp<SkImage> SkImageMakeRasterCopyAndAssignColorSpace(const SkImage*, SkColorSpace*); +/** \enum SkImageInfo::SkImageSourceChannel + Describes different channels we could read from image source. +*/ +enum SkImageSourceChannel { + /** Describes the red channel; */ + kR_SkImageSourceChannel, + + /** Describes the green channel; */ + kG_SkImageSourceChannel, + + /** Describes the blue channel; */ + kB_SkImageSourceChannel, + + /** Describes the alpha channel; */ + kA_SkImageSourceChannel, + + /** Describes the alpha channel; */ + kLastEnum_SkImageSourceChannel = kA_SkImageSourceChannel, +}; + +/** \struct SkYUVAIndex + Describes from which image source and which channel to read each individual YUVA plane. + + SkYUVAIndex contains a index for which image source to read from and a enum for which channel + to read from. +*/ +struct SK_API SkYUVAIndex { + /** The index is a number between -1..3 which definies which image source to read from, where -1 + * means the image source doesn't exist. The assumption is we will always have image sources for + * each of YUV planes, but optionally have image source for A plane. */ + int fIndex; + /** The channel describes from which channel to read the info from. Currently we only deal with + * YUV and NV12 and channel info is ignored. */ + SkImageSourceChannel fChannel; +}; + #endif |