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 |