diff options
author | dvonbeck <dvonbeck@google.com> | 2016-07-14 09:02:18 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-14 09:02:18 -0700 |
commit | cfc79fe9a3be30b01537214a1d24580951c76c16 (patch) | |
tree | 8bf60d2d57b6f673aa8cdce566c762afa3539ba0 /include/gpu | |
parent | 1433c676d24c43a9becc7952b856821bb3bc79e9 (diff) |
Added premulFourChannelColor to GrInvariantOutput
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2148273002
Review-Url: https://codereview.chromium.org/2148273002
Diffstat (limited to 'include/gpu')
-rw-r--r-- | include/gpu/GrInvariantOutput.h | 12 |
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); |