diff options
author | 2011-10-27 20:21:16 +0000 | |
---|---|---|
committer | 2011-10-27 20:21:16 +0000 | |
commit | 9381363050ec9d3e724076a8e9152bfa9a8de1d1 (patch) | |
tree | dfb55ed16d0ba0db6671c880bb320198501231c5 /src/gpu/GrInOrderDrawBuffer.cpp | |
parent | 13788bfbedc2528fbfa71162c888908c88f03ac2 (diff) |
Extract GrDrawTarget::DrState into independent GrDrawState struct.
This is intended to be a first step towards making the stack of states
maintained by GrDrawTarget cheaper to maintain.
git-svn-id: http://skia.googlecode.com/svn/trunk@2544 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrInOrderDrawBuffer.cpp')
-rw-r--r-- | src/gpu/GrInOrderDrawBuffer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp index 5e3c769d32..db20846225 100644 --- a/src/gpu/GrInOrderDrawBuffer.cpp +++ b/src/gpu/GrInOrderDrawBuffer.cpp @@ -324,8 +324,8 @@ void GrInOrderDrawBuffer::reset() { this->resetIndexSource(); uint32_t numStates = fStates.count(); for (uint32_t i = 0; i < numStates; ++i) { - const DrState& dstate = this->accessSavedDrawState(fStates[i]); - for (int s = 0; s < kNumStages; ++s) { + const GrDrawState& dstate = this->accessSavedDrawState(fStates[i]); + for (int s = 0; s < GrDrawState::kNumStages; ++s) { GrSafeUnref(dstate.fTextures[s]); } GrSafeUnref(dstate.fRenderTarget); @@ -585,13 +585,13 @@ bool GrInOrderDrawBuffer::needsNewState() const { if (fStates.empty()) { return true; } else { - const DrState& old = this->accessSavedDrawState(fStates.back()); + const GrDrawState& old = this->accessSavedDrawState(fStates.back()); return old != fCurrDrawState; } } void GrInOrderDrawBuffer::pushState() { - for (int s = 0; s < kNumStages; ++s) { + for (int s = 0; s < GrDrawState::kNumStages; ++s) { GrSafeRef(fCurrDrawState.fTextures[s]); } GrSafeRef(fCurrDrawState.fRenderTarget); |