From 01481c8d5821a8dd5850e9f46389b3d84a97f1a4 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Fri, 9 Aug 2019 03:50:47 +0000 Subject: [PATCH] Bug 1570543 - Fix incorrect batch index after merging batches. r=gw Differential Revision: https://phabricator.services.mozilla.com/D41166 --HG-- extra : moz-landing-system : lando --- gfx/wr/webrender/src/batch.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gfx/wr/webrender/src/batch.rs b/gfx/wr/webrender/src/batch.rs index 50df897adcee..a49387dc3138 100644 --- a/gfx/wr/webrender/src/batch.rs +++ b/gfx/wr/webrender/src/batch.rs @@ -429,8 +429,9 @@ impl AlphaBatchContainer { match batch_index { Some(batch_index) => { - self.alpha_batches[batch_index + min_batch_index].merge(other_batch); - min_batch_index = batch_index; + let index = batch_index + min_batch_index; + self.alpha_batches[index].merge(other_batch); + min_batch_index = index; } None => { self.alpha_batches.push(other_batch);