diff options
author | bsalomon <bsalomon@google.com> | 2014-08-11 11:07:48 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-11 11:07:48 -0700 |
commit | 9c0822a4150e23cec9f9b72bd1abc2c5f9ea5a3b (patch) | |
tree | c9e531effb94aa6c4cdf11b51acf019d0ad1c70a /include | |
parent | 3e30af2dca04d45bd3f8fb3aa322e0d90306536f (diff) |
Always use both a color and coverage attribute in GrAARectRenderer.
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/435743002
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/GrColor.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/gpu/GrColor.h b/include/gpu/GrColor.h index c53e4b219d..4ab709b4f1 100644 --- a/include/gpu/GrColor.h +++ b/include/gpu/GrColor.h @@ -88,6 +88,11 @@ static inline void GrColorToRGBAFloat(GrColor color, float rgba[4]) { rgba[3] = GrColorUnpackA(color) * ONE_OVER_255; } +/** Determines whether the color is opaque or not. */ +static inline bool GrColorIsOpaque(GrColor color) { + return (color & (0xFFU << GrColor_SHIFT_A)) == (0xFFU << GrColor_SHIFT_A); +} + /** * Flags used for bitfields of color components. They are defined so that the bit order reflects the * GrColor shift order. |