diff options
Diffstat (limited to 'src/gpu/GrDrawTarget.cpp')
-rw-r--r-- | src/gpu/GrDrawTarget.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp index cd1e0b5bf1..4043eb8dee 100644 --- a/src/gpu/GrDrawTarget.cpp +++ b/src/gpu/GrDrawTarget.cpp @@ -43,6 +43,9 @@ GrDrawTarget::DrawInfo& GrDrawTarget::DrawInfo::operator =(const DrawInfo& di) { fDstCopy = di.fDstCopy; + this->setVertexBuffer(di.vertexBuffer()); + this->setIndexBuffer(di.indexBuffer()); + return *this; } @@ -469,6 +472,9 @@ void GrDrawTarget::drawIndexed(GrDrawState* ds, if (!this->setupDstReadIfNecessary(ds, &info)) { return; } + + this->setDrawBuffers(&info); + this->onDraw(*ds, info, scissorState); } } @@ -508,6 +514,9 @@ void GrDrawTarget::drawNonIndexed(GrDrawState* ds, if (!this->setupDstReadIfNecessary(ds, &info)) { return; } + + this->setDrawBuffers(&info); + this->onDraw(*ds, info, scissorState); } } @@ -754,11 +763,14 @@ void GrDrawTarget::drawIndexedInstances(GrDrawState* ds, if (!this->setupDstReadIfNecessary(ds, &info)) { return; } + while (instanceCount) { info.fInstanceCount = SkTMin(instanceCount, maxInstancesPerDraw); info.fVertexCount = info.fInstanceCount * verticesPerInstance; info.fIndexCount = info.fInstanceCount * indicesPerInstance; + this->setDrawBuffers(&info); + if (this->checkDraw(*ds, type, info.fStartVertex, |