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

Unified Diff: src/gpu/GrInOrderDrawBuffer.cpp

Issue 930953003: Minor refactoring (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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/GrInOrderDrawBuffer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrInOrderDrawBuffer.cpp
diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp
index eb3d19da9cc6b644dbebfce7bbf6aeda0e3875eb..a0aa5237e298622703daa46b5ef73c02014415ac 100644
--- a/src/gpu/GrInOrderDrawBuffer.cpp
+++ b/src/gpu/GrInOrderDrawBuffer.cpp
@@ -641,29 +641,5 @@ void GrInOrderDrawBuffer::willReserveVertexAndIndexSpace(int vertexCount,
int indexCount) {
this->closeBatch();
- // We use geometryHints() to know whether to flush the draw buffer. We
- // can't flush if we are inside an unbalanced pushGeometrySource.
- // Moreover, flushing blows away vertex and index data that was
- // previously reserved. So if the vertex or index data is pulled from
- // reserved space and won't be released by this request then we can't
- // flush.
- bool insideGeoPush = this->getGeoPoolStateStack().count() > 1;
-
- bool unreleasedVertexSpace =
- !vertexCount &&
- kReserved_GeometrySrcType == this->getGeomSrc().fVertexSrc;
-
- bool unreleasedIndexSpace =
- !indexCount &&
- kReserved_GeometrySrcType == this->getGeomSrc().fIndexSrc;
-
- int vcount = vertexCount;
- int icount = indexCount;
-
- if (!insideGeoPush &&
- !unreleasedVertexSpace &&
- !unreleasedIndexSpace &&
- this->geometryHints(vertexStride, &vcount, &icount)) {
- this->flush();
- }
+ this->INHERITED::willReserveVertexAndIndexSpace(vertexCount, vertexStride, indexCount);
}
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698