diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-10-17 12:53:54 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-10-17 12:53:54 +0000 |
commit | 288d9549b42a4eb934e814790f2b7a81f017a9c5 (patch) | |
tree | 0bb1a6e018ebac11283c52b2f1778dc934d84145 /src/gpu/GrDrawState.cpp | |
parent | 20c301bd1aa4578c6d0abb23ac2c72b5fbb436db (diff) |
Separate out the texture matrix from the coord-system change matrix in GrSamplerState. This is a step towards moving texture matrix to GrCustomStage.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6721047
git-svn-id: http://skia.googlecode.com/svn/trunk@5973 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrDrawState.cpp')
-rw-r--r-- | src/gpu/GrDrawState.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp index cc11f6cd87..c95049a491 100644 --- a/src/gpu/GrDrawState.cpp +++ b/src/gpu/GrDrawState.cpp @@ -54,7 +54,7 @@ void GrDrawState::AutoViewMatrixRestore::restore() { fDrawState->setViewMatrix(fViewMatrix); for (int s = 0; s < GrDrawState::kNumStages; ++s) { if (fRestoreMask & (1 << s)) { - fDrawState->sampler(s)->setMatrixDeprecated(fSamplerMatrices[s]); + fDrawState->sampler(s)->restoreCoordChange(fSavedCoordChanges[s]); } } } @@ -77,8 +77,8 @@ void GrDrawState::AutoViewMatrixRestore::set(GrDrawState* drawState, for (int s = 0; s < GrDrawState::kNumStages; ++s) { if (!(explicitCoordStageMask & (1 << s)) && drawState->isStageEnabled(s)) { fRestoreMask |= (1 << s); - fSamplerMatrices[s] = drawState->sampler(s)->getMatrix(); - drawState->sampler(s)->preConcatMatrix(preconcatMatrix); + fDrawState->sampler(s)->saveCoordChange(&fSavedCoordChanges[s]); + drawState->sampler(s)->preConcatCoordChange(preconcatMatrix); } } } @@ -90,7 +90,7 @@ void GrDrawState::AutoDeviceCoordDraw::restore() { fDrawState->setViewMatrix(fViewMatrix); for (int s = 0; s < GrDrawState::kNumStages; ++s) { if (fRestoreMask & (1 << s)) { - fDrawState->sampler(s)->setMatrixDeprecated(fSamplerMatrices[s]); + fDrawState->sampler(s)->restoreCoordChange(fSavedCoordChanges[s]); } } } @@ -124,8 +124,8 @@ bool GrDrawState::AutoDeviceCoordDraw::set(GrDrawState* drawState, } fRestoreMask |= (1 << s); GrSamplerState* sampler = drawState->sampler(s); - fSamplerMatrices[s] = sampler->getMatrix(); - sampler->preConcatMatrix(invVM); + sampler->saveCoordChange(&fSavedCoordChanges[s]); + sampler->preConcatCoordChange(invVM); } } drawState->viewMatrix()->reset(); |