aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu
diff options
context:
space:
mode:
authorGravatar dvonbeck <dvonbeck@google.com>2016-07-14 09:02:18 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-14 09:02:18 -0700
commitcfc79fe9a3be30b01537214a1d24580951c76c16 (patch)
tree8bf60d2d57b6f673aa8cdce566c762afa3539ba0 /include/gpu
parent1433c676d24c43a9becc7952b856821bb3bc79e9 (diff)
Added premulFourChannelColor to GrInvariantOutput
Diffstat (limited to 'include/gpu')
-rw-r--r--include/gpu/GrInvariantOutput.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/gpu/GrInvariantOutput.h b/include/gpu/GrInvariantOutput.h
index 8cf4bf59c3..6e2cbe84f9 100644
--- a/include/gpu/GrInvariantOutput.h
+++ b/include/gpu/GrInvariantOutput.h
@@ -197,6 +197,18 @@ public:
SkDEBUGCODE(this->validate());
}
+ void premulFourChannelColor() {
+ SkDEBUGCODE(this->validate());
+ SkASSERT(!fIsSingleComponent);
+ fNonMulStageFound = true;
+ if (!(fValidFlags & kA_GrColorComponentFlag)) {
+ fValidFlags = kNone_GrColorComponentFlags;
+ } else {
+ fColor = GrPremulColor(fColor);
+ }
+ SkDEBUGCODE(this->validate());
+ }
+
void invalidateComponents(GrColorComponentFlags invalidateFlags, ReadInput readsInput) {
SkDEBUGCODE(this->validate());
fValidFlags = (fValidFlags & ~invalidateFlags);