Don't call finish on GrDrawTarget if we drew no batches

This might give us some minor perf gains in vulkan since we won't be submitting
command buffers that we've added to batch draws to. Running nanobench this does
seem to happen pretty often.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2179903008

Review-Url: https://codereview.chromium.org/2179903008
This commit is contained in:
egdaniel 2016-07-28 08:53:07 -07:00 committed by Commit bot
parent 92772222bf
commit b4021cfd66

View File

@ -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;