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
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index d9dc3d2..7028c91 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -1013,7 +1013,7 @@
static GrVertexLayout aa_rect_layout(const GrDrawTarget* target,
bool useCoverage) {
GrVertexLayout layout = 0;
- for (int s = 0; s < GrDrawTarget::kNumStages; ++s) {
+ for (int s = 0; s < GrDrawState::kNumStages; ++s) {
if (NULL != target->getTexture(s)) {
layout |= GrDrawTarget::StagePosAsTexCoordVertexLayoutBit(s);
}
@@ -1397,8 +1397,8 @@
target = this->prepareToDraw(paint, kUnbuffered_DrawCategory);
#endif
- const GrRect* srcRects[GrDrawTarget::kNumStages] = {NULL};
- const GrMatrix* srcMatrices[GrDrawTarget::kNumStages] = {NULL};
+ const GrRect* srcRects[GrDrawState::kNumStages] = {NULL};
+ const GrMatrix* srcMatrices[GrDrawState::kNumStages] = {NULL};
srcRects[0] = &srcRect;
srcMatrices[0] = srcMatrix;
@@ -1437,7 +1437,7 @@
GrPrintf("Failed to get space for vertices!\n");
return;
}
- int texOffsets[GrDrawTarget::kMaxTexCoords];
+ int texOffsets[GrDrawState::kMaxTexCoords];
int colorOffset;
GrDrawTarget::VertexSizeAndOffsetsByIdx(layout,
texOffsets,