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

Unified Diff: src/gpu/gl/GrGLProgram.cpp

Issue 23875048: Use explicitly-sized enums in GrGLProgramDesc::KeyHeader (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix build error with tests Created 7 years, 3 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 | src/gpu/gl/GrGLProgramDesc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLProgram.cpp
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index f10e8954f20045758ac77e9e75aaf85077fdcaea..2f8e8076636abcfdc7e99117b5b2c532e2fe7771 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -228,7 +228,7 @@ bool GrGLProgram::genProgram(const GrEffectStage* colorStages[],
SkXfermode::Coeff colorCoeff;
SkXfermode::Coeff filterColorCoeff;
SkAssertResult(
- SkXfermode::ModeAsCoeff(static_cast<SkXfermode::Mode>(header.fColorFilterXfermode),
+ SkXfermode::ModeAsCoeff(header.fColorFilterXfermode,
&filterColorCoeff,
&colorCoeff));
bool needColor, needFilterColor;
@@ -311,9 +311,7 @@ bool GrGLProgram::genProgram(const GrEffectStage* colorStages[],
}
}
- GrGLProgramDesc::CoverageOutput coverageOutput =
- static_cast<GrGLProgramDesc::CoverageOutput>(header.fCoverageOutput);
- if (GrGLProgramDesc::CoverageOutputUsesSecondaryOutput(coverageOutput)) {
+ if (GrGLProgramDesc::CoverageOutputUsesSecondaryOutput(header.fCoverageOutput)) {
const char* secondaryOutputName = builder.enableSecondaryOutput();
// default coeff to ones for kCoverage_DualSrcOutput
@@ -333,7 +331,7 @@ bool GrGLProgram::genProgram(const GrEffectStage* colorStages[],
kOnes_GrSLConstantVec,
knownColorValue,
true);
- } else if (GrGLProgramDesc::kSecondaryCoverageISC_CoverageOutput == coverageOutput) {
+ } else if (GrGLProgramDesc::kSecondaryCoverageISC_CoverageOutput == header.fCoverageOutput) {
// Get (1-RGBA) into coeff
knownCoeffValue = GrGLSLSubtractf<4>(&coeff,
NULL,
@@ -365,7 +363,7 @@ bool GrGLProgram::genProgram(const GrEffectStage* colorStages[],
knownCoverageValue,
true);
// Now tack on "+(1-coverage)dst onto the frag color if we were asked to do so.
- if (GrGLProgramDesc::kCombineWithDst_CoverageOutput == coverageOutput) {
+ if (GrGLProgramDesc::kCombineWithDst_CoverageOutput == header.fCoverageOutput) {
SkString dstCoeff;
GrSLConstantVec knownDstCoeffValue = GrGLSLSubtractf<4>(&dstCoeff,
NULL,
« no previous file with comments | « no previous file | src/gpu/gl/GrGLProgramDesc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698