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

Unified Diff: src/gpu/GrInOrderDrawBuffer.cpp

Issue 876673002: Hairline batch (Closed) Base URL: https://skia.googlesource.com/skia.git@2_defer
Patch Set: cleanup Created 5 years, 11 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/GrBatchTarget.cpp ('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 4629d4f7f03cd967da26f5b1c0f5522d8be2f85f..3e177ed20700e893d491dbab061ad8b43bd0684c 100644
--- a/src/gpu/GrInOrderDrawBuffer.cpp
+++ b/src/gpu/GrInOrderDrawBuffer.cpp
@@ -460,7 +460,9 @@ void GrInOrderDrawBuffer::onFlush() {
int currCmdMarker = 0;
+ int i = 0;
while (iter.next()) {
+ i++;
GrGpuTraceMarker newMarker("", -1);
SkString traceString;
if (cmd_has_trace_marker(iter->fType)) {
@@ -472,7 +474,8 @@ void GrInOrderDrawBuffer::onFlush() {
// TODO temporary hack
if (kDrawBatch_Cmd == strip_trace_bit(iter->fType)) {
- fBatchTarget.flushNext();
+ DrawBatch* db = reinterpret_cast<DrawBatch*>(iter.get());
+ fBatchTarget.flushNext(db->fBatch->numberOfDraws());
continue;
}
@@ -652,7 +655,9 @@ void GrInOrderDrawBuffer::recordTraceMarkersIfNecessary() {
void GrInOrderDrawBuffer::closeBatch() {
if (fDrawBatch) {
+ fBatchTarget.resetNumberOfDraws();
fDrawBatch->execute(this, fPrevState);
+ fDrawBatch->fBatch->setNumberOfDraws(fBatchTarget.numberOfDraws());
fDrawBatch = NULL;
}
}
« no previous file with comments | « src/gpu/GrBatchTarget.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698