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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 2179903008: Don't call finish on GrDrawTarget if we drew no batches (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit Created 4 years, 5 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 | « no previous file | no next file » | 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 d03130d18e87564625cb95346fee78293857d062..717cd5d1bb9f109425730cc4e4df6e109347f10c 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -216,6 +216,9 @@ void GrDrawTarget::prepareBatches(GrBatchFlushState* flushState) {
}
void GrDrawTarget::drawBatches(GrBatchFlushState* flushState) {
+ if (0 == fRecordedBatches.count()) {
+ return;
+ }
// Draw all the generated geometry.
SkRandom random;
GrRenderTarget* currentRT = nullptr;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698