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

Unified Diff: src/gpu/GrImmediateDrawTarget.cpp

Issue 1286043004: Make GrVertexBatch objects hold their own draws during GrDrawTarget flush (Closed) Base URL: https://skia.googlesource.com/skia.git@m
Patch Set: forward decl Created 5 years, 4 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/GrImmediateDrawTarget.h ('k') | src/gpu/GrInOrderCommandBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrImmediateDrawTarget.cpp
diff --git a/src/gpu/GrImmediateDrawTarget.cpp b/src/gpu/GrImmediateDrawTarget.cpp
index 5f8d4e6e02ba4043087bcfe0bce253c77c7cbc17..bac9e6004b1141bc80ad8a73b25c32ea739803b8 100644
--- a/src/gpu/GrImmediateDrawTarget.cpp
+++ b/src/gpu/GrImmediateDrawTarget.cpp
@@ -18,7 +18,6 @@
GrImmediateDrawTarget::GrImmediateDrawTarget(GrContext* context)
: INHERITED(context)
- , fBatchTarget(this->getGpu())
, fDrawID(0) {
}
@@ -27,17 +26,18 @@ GrImmediateDrawTarget::~GrImmediateDrawTarget() {
}
void GrImmediateDrawTarget::onDrawBatch(GrDrawBatch* batch) {
- fBatchTarget.resetNumberOfDraws();
+#if 0
// TODO: encapsulate the specialization of GrVertexBatch in GrVertexBatch so that we can
// remove this cast. Currently all GrDrawBatches are in fact GrVertexBatch.
GrVertexBatch* vertexBatch = static_cast<GrVertexBatch*>(batch);
- vertexBatch->generateGeometry(&fBatchTarget);
+ vertexBatch->prepareDraws(&fBatchTarget);
vertexBatch->setNumberOfDraws(fBatchTarget.numberOfDraws());
fBatchTarget.preFlush();
fBatchTarget.flushNext(vertexBatch->numberOfDraws());
fBatchTarget.postFlush();
+#endif
}
void GrImmediateDrawTarget::onClear(const SkIRect& rect, GrColor color,
@@ -66,9 +66,7 @@ void GrImmediateDrawTarget::discard(GrRenderTarget* renderTarget) {
this->getGpu()->discard(renderTarget);
}
-void GrImmediateDrawTarget::onReset() {
- fBatchTarget.reset();
-}
+void GrImmediateDrawTarget::onReset() {}
void GrImmediateDrawTarget::onFlush() {
++fDrawID;
« no previous file with comments | « src/gpu/GrImmediateDrawTarget.h ('k') | src/gpu/GrInOrderCommandBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698