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

Unified Diff: src/gpu/GrBatch.h

Issue 1127273007: Iterate over instanced draws in GrGpu rather than above GrBatchTarget (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove dead code Created 5 years, 7 months 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/GrAtlasTextContext.cpp ('k') | src/gpu/GrBatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrBatch.h
diff --git a/src/gpu/GrBatch.h b/src/gpu/GrBatch.h
index 1da964b7fcdfba5263ddf3d6598a40f2fc7d5092..9c1647d2df664b34ca2506b8998799e11c2cf4ab 100644
--- a/src/gpu/GrBatch.h
+++ b/src/gpu/GrBatch.h
@@ -114,7 +114,7 @@ protected:
space for the vertices and flushes the draws to the batch target.*/
class InstancedHelper {
public:
- InstancedHelper() : fInstancesRemaining(0) {}
+ InstancedHelper() {}
/** Returns the allocated storage for the vertices. The caller should populate the before
vertices before calling issueDraws(). */
void* init(GrBatchTarget* batchTarget, GrPrimitiveType, size_t vertexStride,
@@ -122,15 +122,11 @@ protected:
int instancesToDraw);
/** Call after init() to issue draws to the batch target.*/
- void issueDraws(GrBatchTarget* batchTarget) {
+ void issueDraw(GrBatchTarget* batchTarget) {
SkASSERT(fVertices.instanceCount());
- do {
- batchTarget->draw(fVertices);
- } while (fVertices.nextInstances(&fInstancesRemaining, fMaxInstancesPerDraw));
+ batchTarget->draw(fVertices);
}
private:
- int fInstancesRemaining;
- int fMaxInstancesPerDraw;
GrVertices fVertices;
};
@@ -146,7 +142,7 @@ protected:
calling issueDraws(). */
void* init(GrBatchTarget* batchTarget, size_t vertexStride, int quadsToDraw);
- using InstancedHelper::issueDraws;
+ using InstancedHelper::issueDraw;
private:
typedef InstancedHelper INHERITED;
« no previous file with comments | « src/gpu/GrAtlasTextContext.cpp ('k') | src/gpu/GrBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698