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

Unified Diff: include/gpu/GrInvariantOutput.h

Issue 719203002: Add GrProcOptInfo class to track various output information for color and coverage stages. (Closed) Base URL: https://skia.googlesource.com/skia.git@moveIO
Patch Set: initialize values Created 6 years, 1 month 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 | « gyp/gpu.gypi ('k') | src/gpu/GrDrawState.h » ('j') | 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 8f38d1f8ac167c80372428f26f8dff83a003b0bb..0805ac7933e9c75e66fc03ac86106db00e924ec0 100644
--- a/include/gpu/GrInvariantOutput.h
+++ b/include/gpu/GrInvariantOutput.h
@@ -92,22 +92,9 @@ public:
}
}
- bool isOpaque() const {
- return ((fValidFlags & kA_GrColorComponentFlag) && 0xFF == GrColorUnpackA(fColor));
- }
-
- bool isSolidWhite() const {
- return (fValidFlags == kRGBA_GrColorComponentFlags && 0xFFFFFFFF == fColor);
- }
-
GrColor color() const { return fColor; }
uint8_t validFlags() const { return fValidFlags; }
- bool willUseInputColor() const { return fWillUseInputColor; }
- void resetWillUseInputColor() { fWillUseInputColor = true; }
-
- void resetNonMulStageFound() { fNonMulStageFound = false; }
-
/**
* If isSingleComponent is true, then the flag values for r, g, b, and a must all be the
* same. If the flags are all set then all color components must be equal.
@@ -122,6 +109,16 @@ protected:
bool fWillUseInputColor;
private:
+ friend class GrProcOptInfo;
+
+ void reset(GrColor color, GrColorComponentFlags flags, bool isSingleComponent) {
+ fColor = color;
+ fValidFlags = flags;
+ fIsSingleComponent = isSingleComponent;
+ fNonMulStageFound = false;
+ fWillUseInputColor = true;
+ }
+
void internalSetToTransparentBlack() {
fValidFlags = kRGBA_GrColorComponentFlags;
fColor = 0;
@@ -137,6 +134,19 @@ private:
return ((fValidFlags & kA_GrColorComponentFlag) && 0 == GrColorUnpackA(fColor));
}
+ bool isOpaque() const {
+ return ((fValidFlags & kA_GrColorComponentFlag) && 0xFF == GrColorUnpackA(fColor));
+ }
+
+ bool isSolidWhite() const {
+ return (fValidFlags == kRGBA_GrColorComponentFlags && 0xFFFFFFFF == fColor);
+ }
+
+ bool willUseInputColor() const { return fWillUseInputColor; }
+ void resetWillUseInputColor() { fWillUseInputColor = true; }
+
+ void resetNonMulStageFound() { fNonMulStageFound = false; }
+
SkDEBUGCODE(bool colorComponentsAllEqual() const;)
/**
* If alpha is valid, check that any valid R,G,B values are <= A
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrDrawState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698