aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDrawState.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-07-07 11:54:23 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-07-07 11:54:23 -0700
commitf99f884cd82528684779e40413f1ceaf277dad2d (patch)
treea3e70c0a67e21667b5f5b2b8aa821f6b072bba39 /src/gpu/GrDrawState.cpp
parentf05d6268db18038bd8ef2adfd90e261125c22c56 (diff)
Remove use of GrEffectRef from draw state and below.
R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/372773002
Diffstat (limited to 'src/gpu/GrDrawState.cpp')
-rw-r--r--src/gpu/GrDrawState.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp
index cd594978cc..8285a324d5 100644
--- a/src/gpu/GrDrawState.cpp
+++ b/src/gpu/GrDrawState.cpp
@@ -151,7 +151,7 @@ bool GrDrawState::validateVertexAttribs() const {
for (int s = 0; s < totalStages; ++s) {
int covIdx = s - fColorStages.count();
const GrEffectStage& stage = covIdx < 0 ? fColorStages[s] : fCoverageStages[covIdx];
- const GrEffectRef* effect = stage.getEffect();
+ const GrEffect* effect = stage.getEffect();
SkASSERT(NULL != effect);
// make sure that any attribute indices have the correct binding type, that the attrib
// type and effect's shader lang type are compatible, and that attributes shared by
@@ -165,7 +165,7 @@ bool GrDrawState::validateVertexAttribs() const {
return false;
}
- GrSLType effectSLType = (*effect)->vertexAttribType(i);
+ GrSLType effectSLType = effect->vertexAttribType(i);
GrVertexAttribType attribType = fVAPtr[attribIndex].fType;
int slVecCount = GrSLTypeVectorCount(effectSLType);
int attribVecCount = GrVertexAttribTypeVectorCount(attribType);
@@ -184,13 +184,13 @@ bool GrDrawState::validateVertexAttribs() const {
bool GrDrawState::willEffectReadDstColor() const {
if (!this->isColorWriteDisabled()) {
for (int s = 0; s < fColorStages.count(); ++s) {
- if ((*fColorStages[s].getEffect())->willReadDstColor()) {
+ if (fColorStages[s].getEffect()->willReadDstColor()) {
return true;
}
}
}
for (int s = 0; s < fCoverageStages.count(); ++s) {
- if ((*fCoverageStages[s].getEffect())->willReadDstColor()) {
+ if (fCoverageStages[s].getEffect()->willReadDstColor()) {
return true;
}
}
@@ -213,8 +213,8 @@ bool GrDrawState::srcAlphaWillBeOne() const {
// Run through the color stages
for (int s = 0; s < fColorStages.count(); ++s) {
- const GrEffectRef* effect = fColorStages[s].getEffect();
- (*effect)->getConstantColorComponents(&color, &validComponentFlags);
+ const GrEffect* effect = fColorStages[s].getEffect();
+ effect->getConstantColorComponents(&color, &validComponentFlags);
}
// Check whether coverage is treated as color. If so we run through the coverage computation.
@@ -230,8 +230,8 @@ bool GrDrawState::srcAlphaWillBeOne() const {
}
}
for (int s = 0; s < fCoverageStages.count(); ++s) {
- const GrEffectRef* effect = fCoverageStages[s].getEffect();
- (*effect)->getConstantColorComponents(&color, &validComponentFlags);
+ const GrEffect* effect = fCoverageStages[s].getEffect();
+ effect->getConstantColorComponents(&color, &validComponentFlags);
}
}
return (kA_GrColorComponentFlag & validComponentFlags) && 0xff == GrColorUnpackA(color);
@@ -255,8 +255,8 @@ bool GrDrawState::hasSolidCoverage() const {
// Run through the coverage stages and see if the coverage will be all ones at the end.
for (int s = 0; s < fCoverageStages.count(); ++s) {
- const GrEffectRef* effect = fCoverageStages[s].getEffect();
- (*effect)->getConstantColorComponents(&coverage, &validComponentFlags);
+ const GrEffect* effect = fCoverageStages[s].getEffect();
+ effect->getConstantColorComponents(&coverage, &validComponentFlags);
}
return (kRGBA_GrColorComponentFlags == validComponentFlags) && (0xffffffff == coverage);
}