diff options
author | jvanverth@google.com <jvanverth@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-05 20:33:30 +0000 |
---|---|---|
committer | jvanverth@google.com <jvanverth@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-05 20:33:30 +0000 |
commit | b75b0a0b8492e14c7728e0a0881f87dc64ce60f9 (patch) | |
tree | 9ea1f8dd8637cfcdef7f39562cd4ddd947817076 /src/gpu/gl | |
parent | 69b50e3584b3f76c0ad790322bbad5c7398d554d (diff) |
Move vertex layout from GeometrySrcState to GrDrawState.
Also adds AutoStateRestore member to AutoGeometryPush to push DrawState as well
as GeometrySrcState. And removed vertex layout as an argument to a number of
functions -- they will get vertex layout info from the current DrawState.
Review URL: https://codereview.appspot.com/7286047
git-svn-id: http://skia.googlecode.com/svn/trunk@7600 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/gl')
-rw-r--r-- | src/gpu/gl/GrGpuGL_program.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/gl/GrGpuGL_program.cpp b/src/gpu/gl/GrGpuGL_program.cpp index 28f76de2ac..873317a58d 100644 --- a/src/gpu/gl/GrGpuGL_program.cpp +++ b/src/gpu/gl/GrGpuGL_program.cpp @@ -181,7 +181,7 @@ void GrGpuGL::flushColor(GrColor color) { const ProgramDesc& desc = fCurrentProgram->getDesc(); const GrDrawState& drawState = this->getDrawState(); - if (this->getVertexLayout() & GrDrawState::kColor_VertexLayoutBit) { + if (drawState.getVertexLayout() & GrDrawState::kColor_VertexLayoutBit) { // color will be specified per-vertex as an attribute // invalidate the const vertex attrib color fHWConstAttribColor = GrColor_ILLEGAL; @@ -230,7 +230,7 @@ void GrGpuGL::flushCoverage(GrColor coverage) { // const GrDrawState& drawState = this->getDrawState(); - if (this->getVertexLayout() & GrDrawState::kCoverage_VertexLayoutBit) { + if (this->getDrawState().getVertexLayout() & GrDrawState::kCoverage_VertexLayoutBit) { // coverage will be specified per-vertex as an attribute // invalidate the const vertex attrib coverage fHWConstAttribCoverage = GrColor_ILLEGAL; @@ -363,7 +363,7 @@ void GrGpuGL::setupGeometry(const DrawInfo& info, int* startIndexOffset) { int newTexCoordOffsets[GrDrawState::kMaxTexCoords]; int newEdgeOffset; - GrVertexLayout currLayout = this->getVertexLayout(); + GrVertexLayout currLayout = this->getDrawState().getVertexLayout(); GrGLsizei newStride = GrDrawState::VertexSizeAndOffsetsByIdx(currLayout, newTexCoordOffsets, @@ -502,7 +502,7 @@ void GrGpuGL::buildProgram(bool isPoints, // to a canonical value to avoid duplicate programs with different keys. // Must initialize all fields or cache will have false negatives! - desc->fVertexLayout = this->getVertexLayout(); + desc->fVertexLayout = this->getDrawState().getVertexLayout(); desc->fEmitsPointSize = isPoints; |