aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu/include/GrContext_impl.h
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-05-17 20:15:30 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-05-17 20:15:30 +0000
commit26c2d0a69e66f1656d2dc23953a6f153e5d5009f (patch)
tree02bcdc6be7b315bd6e5a30d3e4ac202b78b845f6 /gpu/include/GrContext_impl.h
parentdb2566bf9682ef3c4c47dca92cef8a4c28d3b3f5 (diff)
Use coverage stages for supersample AA resolve, edgeAA, and glyph masks. Expose a mask stage through GrPaint
Review URL: http://codereview.appspot.com/4548048/ git-svn-id: http://skia.googlecode.com/svn/trunk@1356 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/include/GrContext_impl.h')
-rw-r--r--gpu/include/GrContext_impl.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/gpu/include/GrContext_impl.h b/gpu/include/GrContext_impl.h
index fae4e923f9..c79a191e2f 100644
--- a/gpu/include/GrContext_impl.h
+++ b/gpu/include/GrContext_impl.h
@@ -40,19 +40,15 @@ inline void GrContext::drawCustomVertices(const GrPaint& paint,
const COL_SRC* colorSrc,
const IDX_SRC* idxSrc) {
- GrVertexLayout layout = 0;
-
GrDrawTarget::AutoReleaseGeometry geo;
GrDrawTarget* target = this->prepareToDraw(paint, kUnbuffered_DrawCategory);
- if (NULL != paint.getTexture()) {
- if (NULL != texCoordSrc) {
- layout |= GrDrawTarget::StageTexCoordVertexLayoutBit(0,0);
- } else {
- layout |= GrDrawTarget::StagePosAsTexCoordVertexLayoutBit(0);
- }
- }
+ bool hasTexCoords[GrPaint::kTotalStages] = {
+ NULL != texCoordSrc, // texCoordSrc provides explicit stage 0 coords
+ 0 // remaining stages use positions
+ };
+ GrVertexLayout layout = PaintStageVertexLayoutBits(paint, hasTexCoords);
if (NULL != colorSrc) {
layout |= GrDrawTarget::kColor_VertexLayoutBit;