diff options
author | 2014-11-18 14:24:27 -0800 | |
---|---|---|
committer | 2014-11-18 14:24:27 -0800 | |
commit | 7eb8c7b00a5d776bebaf33a8687357df95c1aa43 (patch) | |
tree | eede33f3188a76b505c13c3b56a2409856d9861d /src/gpu/GrDrawTarget.cpp | |
parent | 914dd53a4272f6928a8380c24f6e30666ed6c0d2 (diff) |
drawinfo carries bufferinfo
BUG=skia:
Review URL: https://codereview.chromium.org/737723003
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, |