Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Unified Diff: include/gpu/GrInvariantOutput.h

Issue 2148273002: Added premulFourChannelColor to GrInvariantOutput (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrInvariantOutput.h
diff --git a/include/gpu/GrInvariantOutput.h b/include/gpu/GrInvariantOutput.h
index 8cf4bf59c3244d2552e45b926ade4535061ee1b4..6e2cbe84f9a07dce127be0113836afd35d50f5c4 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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698