Added gpu AA clipping to old shader path
http://codereview.appspot.com/6139065/
git-svn-id: http://skia.googlecode.com/svn/trunk@3812 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index ca499db..273ef3c 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -209,6 +209,19 @@
return (1 << (TEX_COORD_BIT_CNT + stage));
}
+ /**
+ * Modify the existing vertex layout. Realistically the only thing that
+ * can be added w/o recomputing the vertex layout is one of the
+ * StagePosAsTexCoordVertexLayoutBit flags
+ */
+ void addToVertexLayout(int flag) {
+ GrAssert((1 << TEX_COORD_BIT_CNT) == flag ||
+ (1 << (TEX_COORD_BIT_CNT + 1)) == flag ||
+ (1 << (TEX_COORD_BIT_CNT + 2)) == flag ||
+ (1 << (TEX_COORD_BIT_CNT + 3)) == flag);
+ fGeoSrcStateStack.back().fVertexLayout |= flag;
+ }
+
private:
static const int STAGE_BIT_CNT = TEX_COORD_BIT_CNT +
GrDrawState::kNumStages;