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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 773433002: Add a base class for GrIODB that handles geometry data (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup Created 6 years 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/GrFlushToGpuDrawTarget.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 9ac2d6a3b93e9d39123933760e74cbd0b19d0906..c385f27100d1bbcd92bb084ba4f3b58d6990672e 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -472,7 +472,7 @@ void GrDrawTarget::drawIndexed(GrDrawState* ds,
if (!this->setupDstReadIfNecessary(ds, &dstCopy, devBounds)) {
return;
}
- this->setDrawBuffers(&info);
+ this->setDrawBuffers(&info, ds->getVertexStride());
this->onDraw(*ds, info, scissorState, dstCopy.texture() ? &dstCopy : NULL);
}
@@ -515,7 +515,7 @@ void GrDrawTarget::drawNonIndexed(GrDrawState* ds,
return;
}
- this->setDrawBuffers(&info);
+ this->setDrawBuffers(&info, ds->getVertexStride());
this->onDraw(*ds, info, scissorState, dstCopy.texture() ? &dstCopy : NULL);
}
@@ -773,14 +773,13 @@ void GrDrawTarget::drawIndexedInstances(GrDrawState* ds,
info.fVertexCount = info.fInstanceCount * verticesPerInstance;
info.fIndexCount = info.fInstanceCount * indicesPerInstance;
- this->setDrawBuffers(&info);
-
if (this->checkDraw(*ds,
type,
info.fStartVertex,
info.fStartIndex,
info.fVertexCount,
info.fIndexCount)) {
+ this->setDrawBuffers(&info, ds->getVertexStride());
this->onDraw(*ds, info, scissorState, dstCopy.texture() ? &dstCopy : NULL);
}
info.fStartVertex += info.fVertexCount;
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrFlushToGpuDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698