Search and replace change. Some Gr enum value names didn't have a "Gr" in their suffix.
Verbal LGTM from TomH
git-svn-id: http://skia.googlecode.com/svn/trunk@4198 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index b1d6d4f..3202d39 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -112,7 +112,7 @@
case ProgramDesc::kCoverage_DualSrcOutput:
case ProgramDesc::kCoverageISA_DualSrcOutput:
case ProgramDesc::kCoverageISC_DualSrcOutput:
- *dstCoeff = (GrBlendCoeff)GrGpu::kIS2C_BlendCoeff;
+ *dstCoeff = (GrBlendCoeff)GrGpu::kIS2C_GrBlendCoeff;
break;
default:
GrCrash("Unexpected dual source blend output");
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 82a65fd..d5c0bd2 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -83,30 +83,32 @@
false,
};
return gCoeffReferencesBlendConst[coeff];
- GR_STATIC_ASSERT(kTotalBlendCoeffCount == GR_ARRAY_COUNT(gCoeffReferencesBlendConst));
+ GR_STATIC_ASSERT(kTotalGrBlendCoeffCount ==
+ GR_ARRAY_COUNT(gCoeffReferencesBlendConst));
- GR_STATIC_ASSERT(0 == kZero_BlendCoeff);
- GR_STATIC_ASSERT(1 == kOne_BlendCoeff);
- GR_STATIC_ASSERT(2 == kSC_BlendCoeff);
- GR_STATIC_ASSERT(3 == kISC_BlendCoeff);
- GR_STATIC_ASSERT(4 == kDC_BlendCoeff);
- GR_STATIC_ASSERT(5 == kIDC_BlendCoeff);
- GR_STATIC_ASSERT(6 == kSA_BlendCoeff);
- GR_STATIC_ASSERT(7 == kISA_BlendCoeff);
- GR_STATIC_ASSERT(8 == kDA_BlendCoeff);
- GR_STATIC_ASSERT(9 == kIDA_BlendCoeff);
- GR_STATIC_ASSERT(10 == kConstC_BlendCoeff);
- GR_STATIC_ASSERT(11 == kIConstC_BlendCoeff);
- GR_STATIC_ASSERT(12 == kConstA_BlendCoeff);
- GR_STATIC_ASSERT(13 == kIConstA_BlendCoeff);
+ GR_STATIC_ASSERT(0 == kZero_GrBlendCoeff);
+ GR_STATIC_ASSERT(1 == kOne_GrBlendCoeff);
+ GR_STATIC_ASSERT(2 == kSC_GrBlendCoeff);
+ GR_STATIC_ASSERT(3 == kISC_GrBlendCoeff);
+ GR_STATIC_ASSERT(4 == kDC_GrBlendCoeff);
+ GR_STATIC_ASSERT(5 == kIDC_GrBlendCoeff);
+ GR_STATIC_ASSERT(6 == kSA_GrBlendCoeff);
+ GR_STATIC_ASSERT(7 == kISA_GrBlendCoeff);
+ GR_STATIC_ASSERT(8 == kDA_GrBlendCoeff);
+ GR_STATIC_ASSERT(9 == kIDA_GrBlendCoeff);
+ GR_STATIC_ASSERT(10 == kConstC_GrBlendCoeff);
+ GR_STATIC_ASSERT(11 == kIConstC_GrBlendCoeff);
+ GR_STATIC_ASSERT(12 == kConstA_GrBlendCoeff);
+ GR_STATIC_ASSERT(13 == kIConstA_GrBlendCoeff);
- GR_STATIC_ASSERT(14 == kS2C_BlendCoeff);
- GR_STATIC_ASSERT(15 == kIS2C_BlendCoeff);
- GR_STATIC_ASSERT(16 == kS2A_BlendCoeff);
- GR_STATIC_ASSERT(17 == kIS2A_BlendCoeff);
+ GR_STATIC_ASSERT(14 == kS2C_GrBlendCoeff);
+ GR_STATIC_ASSERT(15 == kIS2C_GrBlendCoeff);
+ GR_STATIC_ASSERT(16 == kS2A_GrBlendCoeff);
+ GR_STATIC_ASSERT(17 == kIS2A_GrBlendCoeff);
// assertion for gXfermodeCoeff2Blend have to be in GrGpu scope
- GR_STATIC_ASSERT(kTotalBlendCoeffCount == GR_ARRAY_COUNT(gXfermodeCoeff2Blend));
+ GR_STATIC_ASSERT(kTotalGrBlendCoeffCount ==
+ GR_ARRAY_COUNT(gXfermodeCoeff2Blend));
}
///////////////////////////////////////////////////////////////////////////////
@@ -2005,19 +2007,19 @@
GL_CALL(Enable(GR_GL_BLEND));
fHWBlendState.fEnabled = kYes_TriState;
}
- if (kSA_BlendCoeff != fHWBlendState.fSrcCoeff ||
- kISA_BlendCoeff != fHWBlendState.fDstCoeff) {
- GL_CALL(BlendFunc(gXfermodeCoeff2Blend[kSA_BlendCoeff],
- gXfermodeCoeff2Blend[kISA_BlendCoeff]));
- fHWBlendState.fSrcCoeff = kSA_BlendCoeff;
- fHWBlendState.fDstCoeff = kISA_BlendCoeff;
+ if (kSA_GrBlendCoeff != fHWBlendState.fSrcCoeff ||
+ kISA_GrBlendCoeff != fHWBlendState.fDstCoeff) {
+ GL_CALL(BlendFunc(gXfermodeCoeff2Blend[kSA_GrBlendCoeff],
+ gXfermodeCoeff2Blend[kISA_GrBlendCoeff]));
+ fHWBlendState.fSrcCoeff = kSA_GrBlendCoeff;
+ fHWBlendState.fDstCoeff = kISA_GrBlendCoeff;
}
} else {
// any optimization to disable blending should
// have already been applied and tweaked the coeffs
// to (1, 0).
- bool blendOff = kOne_BlendCoeff == srcCoeff &&
- kZero_BlendCoeff == dstCoeff;
+ bool blendOff = kOne_GrBlendCoeff == srcCoeff &&
+ kZero_GrBlendCoeff == dstCoeff;
if (blendOff) {
if (kNo_TriState != fHWBlendState.fEnabled) {
GL_CALL(Disable(GR_GL_BLEND));
diff --git a/src/gpu/gl/GrGpuGL.h b/src/gpu/gl/GrGpuGL.h
index df729a7..2906170 100644
--- a/src/gpu/gl/GrGpuGL.h
+++ b/src/gpu/gl/GrGpuGL.h
@@ -331,8 +331,8 @@
TriState fEnabled;
void invalidate() {
- fSrcCoeff = kInvalid_BlendCoeff;
- fDstCoeff = kInvalid_BlendCoeff;
+ fSrcCoeff = kInvalid_GrBlendCoeff;
+ fDstCoeff = kInvalid_GrBlendCoeff;
fConstColorValid = false;
fEnabled = kUnknown_TriState;
}
diff --git a/src/gpu/gl/GrGpuGL_program.cpp b/src/gpu/gl/GrGpuGL_program.cpp
index 581a22a..d8299ff 100644
--- a/src/gpu/gl/GrGpuGL_program.cpp
+++ b/src/gpu/gl/GrGpuGL_program.cpp
@@ -657,7 +657,7 @@
// Must initialize all fields or cache will have false negatives!
desc.fVertexLayout = this->getVertexLayout();
- desc.fEmitsPointSize = kPoints_PrimitiveType == type;
+ desc.fEmitsPointSize = kPoints_GrPrimitiveType == type;
bool requiresAttributeColors =
!skipColor && SkToBool(desc.fVertexLayout & kColor_VertexLayoutBit);
@@ -847,16 +847,16 @@
if (this->getCaps().fDualSourceBlendingSupport &&
!(blendOpts & (kEmitCoverage_BlendOptFlag |
kCoverageAsAlpha_BlendOptFlag))) {
- if (kZero_BlendCoeff == dstCoeff) {
+ if (kZero_GrBlendCoeff == dstCoeff) {
// write the coverage value to second color
desc.fDualSrcOutput = ProgramDesc::kCoverage_DualSrcOutput;
desc.fFirstCoverageStage = firstCoverageStage;
- } else if (kSA_BlendCoeff == dstCoeff) {
+ } else if (kSA_GrBlendCoeff == dstCoeff) {
// SA dst coeff becomes 1-(1-SA)*coverage when dst is partially
// cover
desc.fDualSrcOutput = ProgramDesc::kCoverageISA_DualSrcOutput;
desc.fFirstCoverageStage = firstCoverageStage;
- } else if (kSC_BlendCoeff == dstCoeff) {
+ } else if (kSC_GrBlendCoeff == dstCoeff) {
// SA dst coeff becomes 1-(1-SA)*coverage when dst is partially
// cover
desc.fDualSrcOutput = ProgramDesc::kCoverageISC_DualSrcOutput;