Move SkColorChannel into SkColor

By making it in a more common header, this enum can be reused by the
SkDisplacementMapEffect.

Bug: skia:9280
Change-Id: Ia8352e0530f915cdad659c657bd86710226582b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230118
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Michael Ludwig 2019-07-26 11:15:23 -04:00 committed by Skia Commit-Bot
parent 8e9fc27822
commit 130be09f5b
2 changed files with 13 additions and 12 deletions

View File

@ -218,6 +218,18 @@ SK_API SkPMColor SkPreMultiplyARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b);
*/
SK_API SkPMColor SkPreMultiplyColor(SkColor c);
/** \enum SkColorChannel
Describes different color channels one can manipulate
*/
enum class SkColorChannel {
kR, // the red channel
kG, // the green channel
kB, // the blue channel
kA, // the alpha channel
kLastEnum = kA,
};
/** \struct SkRGBA4f
RGBA color value, holding four floating point components. Color components are always in
a known order. kAT determines if the SkRGBA4f's R, G, and B components are premultiplied

View File

@ -8,20 +8,9 @@
#ifndef SkYUVAIndex_DEFINED
#define SkYUVAIndex_DEFINED
#include "include/core/SkColor.h"
#include "include/core/SkTypes.h"
/** \enum SkColorChannel
Describes different color channels one can manipulate
*/
enum class SkColorChannel {
kR, // the red channel
kG, // the green channel
kB, // the blue channel
kA, // the alpha channel
kLastEnum = kA,
};
/** \struct SkYUVAIndex
Describes from which image source and which channel to read each individual YUVA plane.