Index: include/gpu/GrInvariantOutput.h |
diff --git a/include/gpu/GrInvariantOutput.h b/include/gpu/GrInvariantOutput.h |
index 29f83ed15dba43b85a77412c6b9b7023a97a85d4..83deac39f7ab102f51e9202f931412a6e012ed82 100644 |
--- a/include/gpu/GrInvariantOutput.h |
+++ b/include/gpu/GrInvariantOutput.h |
@@ -12,7 +12,7 @@ |
struct GrInitInvariantOutput { |
GrInitInvariantOutput() |
- : fValidFlags(0) |
+ : fValidFlags(kNone_GrColorComponentFlags) |
, fColor(0) |
, fIsSingleComponent(false) |
, fIsLCDCoverage(false) {} |
@@ -24,7 +24,7 @@ struct GrInitInvariantOutput { |
} |
void setUnknownFourComponents() { |
- fValidFlags = 0; |
+ fValidFlags = kNone_GrColorComponentFlags; |
fIsSingleComponent = false; |
} |
@@ -41,16 +41,17 @@ struct GrInitInvariantOutput { |
} |
void setUnknownSingleComponent() { |
- fValidFlags = 0; |
+ fValidFlags = kNone_GrColorComponentFlags; |
fIsSingleComponent = true; |
} |
void setUsingLCDCoverage() { fIsLCDCoverage = true; } |
- uint32_t fValidFlags; |
- GrColor fColor; |
- bool fIsSingleComponent; |
- bool fIsLCDCoverage; // Temorary data member until texture pixel configs are updated |
+ GrColorComponentFlags fValidFlags; |
+ GrColor fColor; |
+ bool fIsSingleComponent; |
+ bool fIsLCDCoverage; // Temorary data member until texture pixel configs are |
+ // updated |
}; |
class GrInvariantOutput { |
@@ -107,7 +108,7 @@ public: |
this->internalSetToTransparentBlack(); |
} else { |
// We don't need to change fIsSingleComponent in this case |
- fValidFlags = 0; |
+ fValidFlags = kNone_GrColorComponentFlags; |
} |
SkDEBUGCODE(this->validate()); |
} |
@@ -171,7 +172,7 @@ public: |
} |
} else { |
fIsSingleComponent = false; |
- fValidFlags = 0; |
+ fValidFlags = kNone_GrColorComponentFlags; |
} |
SkDEBUGCODE(this->validate()); |
} |
@@ -189,16 +190,16 @@ public: |
fColor = GrColorPackRGBA(a, a, a, a); |
fValidFlags = kRGBA_GrColorComponentFlags; |
} else { |
- fValidFlags = 0; |
+ fValidFlags = kNone_GrColorComponentFlags; |
} |
fIsSingleComponent = true; |
} |
SkDEBUGCODE(this->validate()); |
} |
- void invalidateComponents(uint8_t invalidateFlags, ReadInput readsInput) { |
+ void invalidateComponents(GrColorComponentFlags invalidateFlags, ReadInput readsInput) { |
SkDEBUGCODE(this->validate()); |
- fValidFlags &= ~invalidateFlags; |
+ fValidFlags = (fValidFlags & ~invalidateFlags); |
fIsSingleComponent = false; |
fNonMulStageFound = true; |
if (kWillNot_ReadInput == readsInput) { |
@@ -207,7 +208,7 @@ public: |
SkDEBUGCODE(this->validate()); |
} |
- void setToOther(uint8_t validFlags, GrColor color, ReadInput readsInput) { |
+ void setToOther(GrColorComponentFlags validFlags, GrColor color, ReadInput readsInput) { |
SkDEBUGCODE(this->validate()); |
fValidFlags = validFlags; |
fColor = color; |
@@ -247,7 +248,7 @@ public: |
} |
GrColor color() const { return fColor; } |
- uint8_t validFlags() const { return fValidFlags; } |
+ GrColorComponentFlags validFlags() const { return fValidFlags; } |
/** |
* If isSingleComponent is true, then the flag values for r, g, b, and a must all be the |
@@ -289,7 +290,7 @@ private: |
} |
void internalSetToUnknown() { |
- fValidFlags = 0; |
+ fValidFlags = kNone_GrColorComponentFlags; |
fIsSingleComponent = false; |
} |
@@ -322,7 +323,7 @@ private: |
SkDEBUGCODE(bool validPreMulColor() const;) |
GrColor fColor; |
- uint32_t fValidFlags; |
+ GrColorComponentFlags fValidFlags; |
bool fIsSingleComponent; |
bool fNonMulStageFound; |
bool fWillUseInputColor; |