aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDrawTarget.h
diff options
context:
space:
mode:
authorGravatar tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-25 17:27:28 +0000
committerGravatar tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-25 17:27:28 +0000
commitf13f58804659175925042a291304d483a4fd9278 (patch)
treec3c31ab0c9a984f3f0ded3197209ef0fc679a330 /src/gpu/GrDrawTarget.h
parentf41f4d22576c95f0e3ddfc87be40fcf4ee34b408 (diff)
Add GrPaint::*StageEnabled() and GrDrawState::stageEnabled() functions.
These wrap the question of "is this stage of the shader enabled?" so that we can change the semantics - previously iff there was a texture, now if there is a texture OR a GrCustomStage, soon (post-cl 6306097) iff there is a GrCustomStage, which at that point will hold whatever texture is necessary. http://codereview.appspot.com/6306104/ git-svn-id: http://skia.googlecode.com/svn/trunk@4325 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrDrawTarget.h')
-rw-r--r--src/gpu/GrDrawTarget.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index 73de1c5ee2..f619469f34 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -952,15 +952,9 @@ protected:
return 0;
}
}
- // given (a vertex layout and) a draw state, will a stage be used?
- static bool StageWillBeUsed(int stage,
- const GrDrawState& state) {
- return NULL != state.getTexture(stage);
- }
bool isStageEnabled(int stage) const {
- return StageWillBeUsed(stage,
- this->getDrawState());
+ return this->getDrawState().isStageEnabled(stage);
}
StageMask enabledStages() const {