Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 737723003: drawinfo carries bufferinfo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: feedback inc Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.cpp
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index cd1e0b5bf10cc05bb712c58dbe42f5dda9e60a1f..4043eb8dee544d26789c35e725dc40d8de5b17d9 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,
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698