aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-25 12:47:42 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-25 12:47:42 +0000
commit021fc736f89fddac4f26b3f32f50263ff8fe3279 (patch)
treed284042c593d840c591753bfc849fe675980960b /src/gpu
parent8b0e2340e11e973d27aea39ec65e6bc9738224a5 (diff)
GrCustomStage Renaming Part 5
Stuff found by searching for "stage". R=robertphillips@google.com Review URL: https://codereview.appspot.com/6772043 git-svn-id: http://skia.googlecode.com/svn/trunk@6089 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrContext.cpp28
-rw-r--r--src/gpu/GrDrawState.h5
-rw-r--r--src/gpu/GrDrawTarget.cpp14
-rw-r--r--src/gpu/GrEffect.cpp3
-rw-r--r--src/gpu/SkGpuDevice.cpp22
-rw-r--r--src/gpu/effects/GrConfigConversionEffect.cpp22
-rw-r--r--src/gpu/effects/GrConvolutionEffect.cpp7
-rw-r--r--src/gpu/effects/GrSingleTextureEffect.cpp5
-rw-r--r--src/gpu/effects/GrTextureDomainEffect.cpp5
-rw-r--r--src/gpu/gl/GrGLProgram.cpp10
-rw-r--r--src/gpu/gl/GrGLProgram.h2
-rw-r--r--src/gpu/gl/GrGLProgramStage.cpp6
-rw-r--r--src/gpu/gl/GrGLProgramStage.h2
-rw-r--r--src/gpu/gl/GrGpuGL_program.cpp6
14 files changed, 67 insertions, 70 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index e6d5b4c576..858242b0d8 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -1317,16 +1317,16 @@ bool GrContext::readRenderTargetPixels(GrRenderTarget* target,
ast.set(this, desc, match);
GrTexture* texture = ast.texture();
if (texture) {
- SkAutoTUnref<GrEffect> stage;
+ SkAutoTUnref<GrEffect> effect;
if (unpremul) {
- stage.reset(this->createPMToUPMEffect(src, swapRAndB));
+ effect.reset(this->createPMToUPMEffect(src, swapRAndB));
}
// If we failed to create a PM->UPM effect and have no other conversions to perform then
// there is no longer any point to using the scratch.
- if (NULL != stage || flipY || swapRAndB) {
- if (NULL == stage) {
- stage.reset(GrConfigConversionEffect::Create(src, swapRAndB));
- GrAssert(NULL != stage);
+ if (NULL != effect || flipY || swapRAndB) {
+ if (NULL == effect) {
+ effect.reset(GrConfigConversionEffect::Create(src, swapRAndB));
+ GrAssert(NULL != effect);
} else {
unpremul = false; // we will handle the UPM conversion in the draw
}
@@ -1345,7 +1345,7 @@ bool GrContext::readRenderTargetPixels(GrRenderTarget* target,
matrix.setTranslate(SK_Scalar1 *left, SK_Scalar1 *top);
}
matrix.postIDiv(src->width(), src->height());
- drawState->sampler(0)->setEffect(stage, matrix);
+ drawState->sampler(0)->setEffect(effect, matrix);
GrRect rect = GrRect::MakeWH(GrIntToScalar(width), GrIntToScalar(height));
fGpu->drawSimpleRect(rect, NULL);
// we want to read back from the scratch's origin
@@ -1490,7 +1490,7 @@ void GrContext::writeRenderTargetPixels(GrRenderTarget* target,
return;
}
#endif
- SkAutoTUnref<GrEffect> stage;
+ SkAutoTUnref<GrEffect> effect;
bool swapRAndB = (fGpu->preferredReadPixelsConfig(config) == GrPixelConfigSwapRAndB(config));
GrPixelConfig textureConfig;
@@ -1516,8 +1516,8 @@ void GrContext::writeRenderTargetPixels(GrRenderTarget* target,
if (kRGBA_8888_GrPixelConfig != config && kBGRA_8888_GrPixelConfig != config) {
return;
}
- stage.reset(this->createUPMToPMEffect(texture, swapRAndB));
- if (NULL == stage) {
+ effect.reset(this->createUPMToPMEffect(texture, swapRAndB));
+ if (NULL == effect) {
SkCanvas::Config8888 srcConfig8888, dstConfig8888;
GR_DEBUGCODE(bool success = )
grconfig_to_config8888(config, true, &srcConfig8888);
@@ -1534,9 +1534,9 @@ void GrContext::writeRenderTargetPixels(GrRenderTarget* target,
rowBytes = 4 * width;
}
}
- if (NULL == stage) {
- stage.reset(GrConfigConversionEffect::Create(texture, swapRAndB));
- GrAssert(NULL != stage);
+ if (NULL == effect) {
+ effect.reset(GrConfigConversionEffect::Create(texture, swapRAndB));
+ GrAssert(NULL != effect);
}
this->writeTexturePixels(texture,
@@ -1553,7 +1553,7 @@ void GrContext::writeRenderTargetPixels(GrRenderTarget* target,
drawState->setRenderTarget(target);
matrix.setIDiv(texture->width(), texture->height());
- drawState->sampler(0)->setEffect(stage, matrix);
+ drawState->sampler(0)->setEffect(effect, matrix);
fGpu->drawSimpleRect(GrRect::MakeWH(SkIntToScalar(width), SkIntToScalar(height)), NULL);
}
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h
index 330ae66642..54f2179fd5 100644
--- a/src/gpu/GrDrawState.h
+++ b/src/gpu/GrDrawState.h
@@ -26,7 +26,7 @@ public:
SK_DECLARE_INST_COUNT(GrDrawState)
/**
- * Number of texture stages. Each stage takes as input a color and
+ * Number of effect stages. Each stage takes as input a color and
* 2D texture coordinates. The color input to the first enabled stage is the
* per-vertex color or the constant color (setColor/setAlpha) if there are
* no per-vertex colors. For subsequent stages the input color is the output
@@ -190,8 +190,7 @@ public:
*/
void createTextureEffect(int stage, GrTexture* texture) {
GrAssert(!this->getSampler(stage).getEffect());
- this->sampler(stage)->setEffect(
- SkNEW_ARGS(GrSingleTextureEffect, (texture)))->unref();
+ this->sampler(stage)->setEffect(SkNEW_ARGS(GrSingleTextureEffect, (texture)))->unref();
}
void createTextureEffect(int stage, GrTexture* texture, const GrMatrix& matrix) {
GrAssert(!this->getSampler(stage).getEffect());
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index d365a8911a..dbb04a677b 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -748,10 +748,10 @@ bool GrDrawTarget::checkDraw(GrPrimitiveType type, int startVertex,
GrAssert(NULL != drawState.getRenderTarget());
for (int s = 0; s < GrDrawState::kNumStages; ++s) {
if (drawState.isStageEnabled(s)) {
- const GrEffect* stage = drawState.getSampler(s).getEffect();
- int numTextures = stage->numTextures();
+ const GrEffect* effect = drawState.getSampler(s).getEffect();
+ int numTextures = effect->numTextures();
for (int t = 0; t < numTextures; ++t) {
- GrTexture* texture = stage->texture(t);
+ GrTexture* texture = effect->texture(t);
GrAssert(texture->asRenderTarget() != drawState.getRenderTarget());
}
}
@@ -831,11 +831,11 @@ bool GrDrawTarget::srcAlphaWillBeOne(GrVertexLayout layout) const {
// Check if a color stage could create a partial alpha
for (int s = 0; s < drawState.getFirstCoverageStage(); ++s) {
if (this->isStageEnabled(s)) {
- const GrEffect* stage = drawState.getSampler(s).getEffect();
- // FIXME: The param indicates whether the texture is opaque or not. However, the stage
+ const GrEffect* effect = drawState.getSampler(s).getEffect();
+ // FIXME: The param indicates whether the texture is opaque or not. However, the effect
// already controls its textures. It really needs to know whether the incoming color
// (from a uni, per-vertex colors, or previous stage) is opaque or not.
- if (!stage->isOpaque(true)) {
+ if (!effect->isOpaque(true)) {
return false;
}
}
@@ -913,7 +913,7 @@ GrDrawTarget::getBlendOpts(bool forceCoverage,
}
// check for coverage due to constant coverage, per-vertex coverage,
- // edge aa or coverage texture stage
+ // edge aa or coverage stage
bool hasCoverage = forceCoverage ||
0xffffffff != drawState.getCoverage() ||
(layout & kCoverage_VertexLayoutBit) ||
diff --git a/src/gpu/GrEffect.cpp b/src/gpu/GrEffect.cpp
index 352d43cb11..396f5d1058 100644
--- a/src/gpu/GrEffect.cpp
+++ b/src/gpu/GrEffect.cpp
@@ -35,8 +35,7 @@ private:
}
};
-int32_t GrProgramStageFactory::fCurrStageClassID =
- GrProgramStageFactory::kIllegalStageClassID;
+int32_t GrProgramStageFactory::fCurrEffectClassID = GrProgramStageFactory::kIllegalEffectClassID;
GrEffect::GrEffect(int numTextures)
: fNumTextures(numTextures) {
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 5cdecdb553..b7de9add29 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -512,9 +512,9 @@ inline bool skPaint2GrPaintNoShader(SkGpuDevice* dev,
SkColor filtered = colorFilter->filterColor(skPaint.getColor());
grPaint->setColor(SkColor2GrColor(filtered));
} else {
- SkAutoTUnref<GrEffect> stage(colorFilter->asNewEffect(dev->context()));
- if (NULL != stage.get()) {
- grPaint->colorSampler(kColorFilterTextureIdx)->setEffect(stage);
+ SkAutoTUnref<GrEffect> effect(colorFilter->asNewEffect(dev->context()));
+ if (NULL != effect.get()) {
+ grPaint->colorSampler(kColorFilterTextureIdx)->setEffect(effect);
} else {
// TODO: rewrite this using asNewEffect()
SkColor color;
@@ -1415,7 +1415,7 @@ void SkGpuDevice::internalDrawBitmap(const SkBitmap& bitmap,
}
GrRect textureDomain = GrRect::MakeEmpty();
- SkAutoTUnref<GrEffect> stage;
+ SkAutoTUnref<GrEffect> effect;
if (needsTextureDomain) {
// Use a constrained texture domain to avoid color bleeding
GrScalar left, top, right, bottom;
@@ -1434,11 +1434,11 @@ void SkGpuDevice::internalDrawBitmap(const SkBitmap& bitmap,
top = bottom = GrScalarHalf(paintRect.top() + paintRect.bottom());
}
textureDomain.setLTRB(left, top, right, bottom);
- stage.reset(SkNEW_ARGS(GrTextureDomainEffect, (texture, textureDomain, params)));
+ effect.reset(SkNEW_ARGS(GrTextureDomainEffect, (texture, textureDomain, params)));
} else {
- stage.reset(SkNEW_ARGS(GrSingleTextureEffect, (texture, params)));
+ effect.reset(SkNEW_ARGS(GrSingleTextureEffect, (texture, params)));
}
- grPaint->colorSampler(kBitmapTextureIdx)->setEffect(stage);
+ grPaint->colorSampler(kBitmapTextureIdx)->setEffect(effect);
fContext->drawRectToRect(*grPaint, dstRect, paintRect, &m);
}
@@ -1475,18 +1475,18 @@ static GrTexture* filter_texture(SkDevice* device, GrContext* context,
desc.fWidth = SkScalarCeilToInt(rect.width());
desc.fHeight = SkScalarCeilToInt(rect.height());
desc.fConfig = kRGBA_8888_GrPixelConfig;
- GrEffect* stage;
+ GrEffect* effect;
if (filter->canFilterImageGPU()) {
// Save the render target and set it to NULL, so we don't accidentally draw to it in the
// filter. Also set the clip wide open and the matrix to identity.
GrContext::AutoWideOpenIdentityDraw awo(context, NULL);
texture = filter->onFilterImageGPU(&proxy, texture, rect);
- } else if (filter->asNewEffect(&stage, texture)) {
+ } else if (filter->asNewEffect(&effect, texture)) {
GrAutoScratchTexture dst(context, desc);
- apply_effect(context, texture, dst.texture(), rect, stage);
+ apply_effect(context, texture, dst.texture(), rect, effect);
texture = dst.detach();
- stage->unref();
+ effect->unref();
}
return texture;
}
diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp
index beb6107cac..7bc203b062 100644
--- a/src/gpu/effects/GrConfigConversionEffect.cpp
+++ b/src/gpu/effects/GrConfigConversionEffect.cpp
@@ -12,9 +12,9 @@ class GrGLConfigConversionEffect : public GrGLLegacyProgramStage {
public:
GrGLConfigConversionEffect(const GrProgramStageFactory& factory,
const GrEffect& s) : INHERITED (factory) {
- const GrConfigConversionEffect& stage = static_cast<const GrConfigConversionEffect&>(s);
- fSwapRedAndBlue = stage.swapsRedAndBlue();
- fPMConversion = stage.pmConversion();
+ const GrConfigConversionEffect& effect = static_cast<const GrConfigConversionEffect&>(s);
+ fSwapRedAndBlue = effect.swapsRedAndBlue();
+ fPMConversion = effect.pmConversion();
}
virtual void emitVS(GrGLShaderBuilder* builder,
@@ -59,8 +59,8 @@ public:
}
static inline StageKey GenKey(const GrEffect& s, const GrGLCaps&) {
- const GrConfigConversionEffect& stage = static_cast<const GrConfigConversionEffect&>(s);
- return static_cast<int>(stage.swapsRedAndBlue()) | (stage.pmConversion() << 1);
+ const GrConfigConversionEffect& effect = static_cast<const GrConfigConversionEffect&>(s);
+ return static_cast<int>(effect.swapsRedAndBlue()) | (effect.pmConversion() << 1);
}
private:
@@ -177,24 +177,24 @@ void GrConfigConversionEffect::TestForPreservingPMConversions(GrContext* context
GrPaint paint;
- SkAutoTUnref<GrEffect> pmToUPMStage1(SkNEW_ARGS(GrConfigConversionEffect,
+ SkAutoTUnref<GrEffect> pmToUPMEffect1(SkNEW_ARGS(GrConfigConversionEffect,
(dataTex, false, *pmToUPMRule)));
- SkAutoTUnref<GrEffect> upmToPMStage(SkNEW_ARGS(GrConfigConversionEffect,
+ SkAutoTUnref<GrEffect> upmToPMEffect(SkNEW_ARGS(GrConfigConversionEffect,
(readTex, false, *upmToPMRule)));
- SkAutoTUnref<GrEffect> pmToUPMStage2(SkNEW_ARGS(GrConfigConversionEffect,
+ SkAutoTUnref<GrEffect> pmToUPMEffect2(SkNEW_ARGS(GrConfigConversionEffect,
(tempTex, false, *pmToUPMRule)));
context->setRenderTarget(readTex->asRenderTarget());
- paint.colorSampler(0)->setEffect(pmToUPMStage1);
+ paint.colorSampler(0)->setEffect(pmToUPMEffect1);
context->drawRectToRect(paint, kDstRect, kSrcRect);
readTex->readPixels(0, 0, 256, 256, kRGBA_8888_GrPixelConfig, firstRead);
context->setRenderTarget(tempTex->asRenderTarget());
- paint.colorSampler(0)->setEffect(upmToPMStage);
+ paint.colorSampler(0)->setEffect(upmToPMEffect);
context->drawRectToRect(paint, kDstRect, kSrcRect);
context->setRenderTarget(readTex->asRenderTarget());
- paint.colorSampler(0)->setEffect(pmToUPMStage2);
+ paint.colorSampler(0)->setEffect(pmToUPMEffect2);
context->drawRectToRect(paint, kDstRect, kSrcRect);
readTex->readPixels(0, 0, 256, 256, kRGBA_8888_GrPixelConfig, secondRead);
diff --git a/src/gpu/effects/GrConvolutionEffect.cpp b/src/gpu/effects/GrConvolutionEffect.cpp
index 32086ca57b..e49302ef94 100644
--- a/src/gpu/effects/GrConvolutionEffect.cpp
+++ b/src/gpu/effects/GrConvolutionEffect.cpp
@@ -17,8 +17,7 @@ static const UniformHandle kInvalidUniformHandle = GrGLUniformManager::kInvalidU
class GrGLConvolutionEffect : public GrGLLegacyProgramStage {
public:
- GrGLConvolutionEffect(const GrProgramStageFactory& factory,
- const GrEffect& stage);
+ GrGLConvolutionEffect(const GrProgramStageFactory&, const GrEffect&);
virtual void setupVariables(GrGLShaderBuilder* builder) SK_OVERRIDE;
virtual void emitVS(GrGLShaderBuilder* builder,
@@ -43,12 +42,12 @@ private:
};
GrGLConvolutionEffect::GrGLConvolutionEffect(const GrProgramStageFactory& factory,
- const GrEffect& stage)
+ const GrEffect& effect)
: INHERITED(factory)
, fKernelUni(kInvalidUniformHandle)
, fImageIncrementUni(kInvalidUniformHandle) {
const GrConvolutionEffect& c =
- static_cast<const GrConvolutionEffect&>(stage);
+ static_cast<const GrConvolutionEffect&>(effect);
fRadius = c.radius();
}
diff --git a/src/gpu/effects/GrSingleTextureEffect.cpp b/src/gpu/effects/GrSingleTextureEffect.cpp
index 7717f6a882..47e26e5093 100644
--- a/src/gpu/effects/GrSingleTextureEffect.cpp
+++ b/src/gpu/effects/GrSingleTextureEffect.cpp
@@ -14,8 +14,9 @@
class GrGLSingleTextureEffect : public GrGLLegacyProgramStage {
public:
- GrGLSingleTextureEffect(const GrProgramStageFactory& factory,
- const GrEffect& stage) : INHERITED (factory) { }
+ GrGLSingleTextureEffect(const GrProgramStageFactory& factory, const GrEffect&)
+ : INHERITED (factory) {
+ }
virtual void emitVS(GrGLShaderBuilder* builder,
const char* vertexCoords) SK_OVERRIDE { }
diff --git a/src/gpu/effects/GrTextureDomainEffect.cpp b/src/gpu/effects/GrTextureDomainEffect.cpp
index fb0bcff1f3..1203392d66 100644
--- a/src/gpu/effects/GrTextureDomainEffect.cpp
+++ b/src/gpu/effects/GrTextureDomainEffect.cpp
@@ -11,8 +11,7 @@
class GrGLTextureDomainEffect : public GrGLLegacyProgramStage {
public:
- GrGLTextureDomainEffect(const GrProgramStageFactory& factory,
- const GrEffect& stage);
+ GrGLTextureDomainEffect(const GrProgramStageFactory&, const GrEffect&);
virtual void setupVariables(GrGLShaderBuilder* builder) SK_OVERRIDE;
virtual void emitVS(GrGLShaderBuilder* builder,
@@ -33,7 +32,7 @@ private:
};
GrGLTextureDomainEffect::GrGLTextureDomainEffect(const GrProgramStageFactory& factory,
- const GrEffect& stage)
+ const GrEffect&)
: INHERITED(factory)
, fNameUni(GrGLUniformManager::kInvalidUniformHandle) {
}
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index 5549e5819b..ae957e9f9d 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -896,7 +896,7 @@ void GrGLProgram::initSamplerUniforms() {
// Stage code generation
// TODO: Move this function to GrGLShaderBuilder
-GrGLProgramStage* GrGLProgram::GenStageCode(const GrEffect* stage,
+GrGLProgramStage* GrGLProgram::GenStageCode(const GrEffect* effect,
const StageDesc& desc,
StageUniforms* uniforms,
const char* fsInColor, // NULL means no incoming color
@@ -904,7 +904,7 @@ GrGLProgramStage* GrGLProgram::GenStageCode(const GrEffect* stage,
const char* vsInCoord,
GrGLShaderBuilder* builder) {
- GrGLProgramStage* glStage = stage->getFactory().createGLInstance(*stage);
+ GrGLProgramStage* glStage = effect->getFactory().createGLInstance(*effect);
/// Vertex Shader Stuff
@@ -932,13 +932,13 @@ GrGLProgramStage* GrGLProgram::GenStageCode(const GrEffect* stage,
&varyingFSName);
builder->setupTextureAccess(varyingFSName, texCoordVaryingType);
- int numTextures = stage->numTextures();
+ int numTextures = effect->numTextures();
SkSTArray<8, GrGLShaderBuilder::TextureSampler> textureSamplers;
textureSamplers.push_back_n(numTextures);
for (int i = 0; i < numTextures; ++i) {
- textureSamplers[i].init(builder, &stage->textureAccess(i));
+ textureSamplers[i].init(builder, &effect->textureAccess(i));
uniforms->fSamplerUniforms.push_back(textureSamplers[i].fSamplerUniform);
}
@@ -956,7 +956,7 @@ GrGLProgramStage* GrGLProgram::GenStageCode(const GrEffect* stage,
builder->fVSCode.appendf("\t{ // %s\n", glStage->name());
builder->fFSCode.appendf("\t{ // %s \n", glStage->name());
glStage->emitCode(builder,
- *stage,
+ *effect,
desc.fCustomStageKey,
varyingVSName,
fsOutColor,
diff --git a/src/gpu/gl/GrGLProgram.h b/src/gpu/gl/GrGLProgram.h
index f6760a98f7..056b7edf58 100644
--- a/src/gpu/gl/GrGLProgram.h
+++ b/src/gpu/gl/GrGLProgram.h
@@ -175,7 +175,7 @@ private:
void genInputColor(GrGLShaderBuilder* builder, SkString* inColor);
- static GrGLProgramStage* GenStageCode(const GrEffect* stage,
+ static GrGLProgramStage* GenStageCode(const GrEffect* effect,
const StageDesc& desc, // TODO: Eliminate this
StageUniforms* stageUniforms, // TODO: Eliminate this
const char* fsInColor, // NULL means no incoming color
diff --git a/src/gpu/gl/GrGLProgramStage.cpp b/src/gpu/gl/GrGLProgramStage.cpp
index 8cbb7c37b2..cc4cc91fcf 100644
--- a/src/gpu/gl/GrGLProgramStage.cpp
+++ b/src/gpu/gl/GrGLProgramStage.cpp
@@ -20,11 +20,11 @@ GrGLProgramStage::~GrGLProgramStage() {
void GrGLProgramStage::setData(const GrGLUniformManager&, const GrEffect&) {
}
-GrGLProgramStage::StageKey GrGLProgramStage::GenTextureKey(const GrEffect& stage,
+GrGLProgramStage::StageKey GrGLProgramStage::GenTextureKey(const GrEffect& effect,
const GrGLCaps& caps) {
StageKey key = 0;
- for (int index = 0; index < stage.numTextures(); ++index) {
- const GrTextureAccess& access = stage.textureAccess(index);
+ for (int index = 0; index < effect.numTextures(); ++index) {
+ const GrTextureAccess& access = effect.textureAccess(index);
StageKey value = GrGLShaderBuilder::KeyForTextureAccess(access, caps) << index;
GrAssert(0 == (value & key)); // keys for each access ought not to overlap
key |= value;
diff --git a/src/gpu/gl/GrGLProgramStage.h b/src/gpu/gl/GrGLProgramStage.h
index 300e6f1af6..190ea8a699 100644
--- a/src/gpu/gl/GrGLProgramStage.h
+++ b/src/gpu/gl/GrGLProgramStage.h
@@ -77,7 +77,7 @@ public:
/** A GrGLProgramStage instance can be reused with any GrEffect that produces the same stage
key; this function reads data from a stage and uploads any uniform variables required
by the shaders created in emitCode(). */
- virtual void setData(const GrGLUniformManager&, const GrEffect& stage);
+ virtual void setData(const GrGLUniformManager&, const GrEffect&);
const char* name() const { return fFactory.name(); }
diff --git a/src/gpu/gl/GrGpuGL_program.cpp b/src/gpu/gl/GrGpuGL_program.cpp
index 9f78aa416b..5bc84f8055 100644
--- a/src/gpu/gl/GrGpuGL_program.cpp
+++ b/src/gpu/gl/GrGpuGL_program.cpp
@@ -199,11 +199,11 @@ void GrGpuGL::flushTextureMatrix(int s) {
const GrDrawState& drawState = this->getDrawState();
// FIXME: Still assuming only a single texture per effect
- const GrEffect* stage = drawState.getSampler(s).getEffect();
- if (0 == stage->numTextures()) {
+ const GrEffect* effect = drawState.getSampler(s).getEffect();
+ if (0 == effect->numTextures()) {
return;
}
- const GrGLTexture* texture = static_cast<const GrGLTexture*>(stage->texture(0));
+ const GrGLTexture* texture = static_cast<const GrGLTexture*>(effect->texture(0));
if (NULL != texture) {
bool orientationChange = fCurrentProgram->fTextureOrientation[s] !=