diff options
author | jvanverth@google.com <jvanverth@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-06 13:45:11 +0000 |
---|---|---|
committer | jvanverth@google.com <jvanverth@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-06 13:45:11 +0000 |
commit | cbe4f6a42273c2058f1393f7dfa69e4871787ccd (patch) | |
tree | 129f47258224bf8137c6c2fd116af20611ce324e /src/gpu/GrContext.cpp | |
parent | 90096b619b5466d13357d1302ed2488889ff048d (diff) |
Set vertex layout prior to setVertexSourceToBuffer for GR_STATIC_RECT_VB
git-svn-id: http://skia.googlecode.com/svn/trunk@7612 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrContext.cpp')
-rw-r--r-- | src/gpu/GrContext.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index 3f3768a078..0480c085f5 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -780,8 +780,10 @@ void GrContext::drawRect(const GrPaint& paint, GrPrintf("Failed to create static rect vb.\n"); return; } - target->setVertexSourceToBuffer(sqVB); + GrDrawState* drawState = target->drawState(); + drawState->setVertexLayout(GrDrawState::kDefault_VertexLayout); + target->setVertexSourceToBuffer(sqVB); SkMatrix m; m.setAll(rect.width(), 0, rect.fLeft, 0, rect.height(), rect.fTop, @@ -846,6 +848,7 @@ void GrContext::drawRectToRect(const GrPaint& paint, GrPrintf("Failed to create static rect vb.\n"); return; } + drawState->setVertexLayout(GrDrawState::kDefault_VertexLayout); target->setVertexSourceToBuffer(sqVB); target->drawNonIndexed(kTriangleFan_GrPrimitiveType, 0, 4); #else |