Skip batch iteration in GrDrawTarget::forwardCombine when the max look ahead is 0

TBR=robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2288373002

Review-Url: https://codereview.chromium.org/2288373002
This commit is contained in:
bsalomon 2016-08-29 12:43:27 -07:00 committed by Commit bot
parent adbd480102
commit db27fc5ed7

View File

@ -571,6 +571,9 @@ GrBatch* GrDrawTarget::recordBatch(GrBatch* batch, const SkRect& clippedBounds)
}
void GrDrawTarget::forwardCombine() {
if (fMaxBatchLookahead <= 0) {
return;
}
for (int i = 0; i < fRecordedBatches.count() - 2; ++i) {
GrBatch* batch = fRecordedBatches[i].fBatch.get();
const SkRect& batchBounds = fRecordedBatches[i].fClippedBounds;