From 4485bf60d087482aa544953bd45c2dce3dd4d380 Mon Sep 17 00:00:00 2001 From: wkorman Date: Mon, 23 Nov 2015 22:08:53 -0800 Subject: Fix clip/transform pairing to follow LIFO order. BUG=529938 Review URL: https://codereview.chromium.org/1473453002 Cr-Commit-Position: refs/heads/master@{#361261} --- ui/compositor/clip_transform_recorder.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/compositor/clip_transform_recorder.cc b/ui/compositor/clip_transform_recorder.cc index ddc70d1..8afd8be 100644 --- a/ui/compositor/clip_transform_recorder.cc +++ b/ui/compositor/clip_transform_recorder.cc @@ -20,8 +20,8 @@ ClipTransformRecorder::ClipTransformRecorder(const PaintContext& context) } ClipTransformRecorder::~ClipTransformRecorder() { - for (size_t i = 0; i < num_closers_; ++i) { - switch (closers_[i]) { + for (size_t i = num_closers_; i > 0; --i) { + switch (closers_[i - 1]) { case CLIP_RECT: context_.list_->CreateAndAppendItem(); break; -- cgit v1.1