Commit e3d45125 authored by Chris Harrelson's avatar Chris Harrelson Committed by Commit Bot

Fix copy constructor to pass along slow mode.

This was missed in an earlier patch.

TBR=wangxianzhu@chromium.org
Bug: 969161

Change-Id: Ia9e1d1619ddc105c7d36a79cb23ed30a016737b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1639140Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665285}
parent 3c0d73c0
......@@ -42,11 +42,12 @@ class GraphicsLayerUpdater::UpdateContext {
UpdateContext()
: compositing_stacking_context_(nullptr),
compositing_ancestor_(nullptr),
use_slow_path(false) {}
use_slow_path_(false) {}
UpdateContext(const UpdateContext& other, const PaintLayer& layer)
: compositing_stacking_context_(other.compositing_stacking_context_),
compositing_ancestor_(other.CompositingContainer(layer)) {
compositing_ancestor_(other.CompositingContainer(layer)),
use_slow_path_(other.use_slow_path_) {
CompositingState compositing_state = layer.GetCompositingState();
if (compositing_state != kNotComposited &&
compositing_state != kPaintsIntoGroupedBacking) {
......@@ -64,11 +65,11 @@ class GraphicsLayerUpdater::UpdateContext {
// for these situations, to simplify the logic.
if (layer.GetLayoutObject().IsSVGRoot() ||
layer.IsReplacedNormalFlowStacking())
use_slow_path = true;
use_slow_path_ = true;
}
const PaintLayer* CompositingContainer(const PaintLayer& layer) const {
if (use_slow_path)
if (use_slow_path_)
return layer.EnclosingLayerWithCompositedLayerMapping(kExcludeSelf);
const PaintLayer* compositing_container;
......@@ -100,7 +101,7 @@ class GraphicsLayerUpdater::UpdateContext {
private:
const PaintLayer* compositing_stacking_context_;
const PaintLayer* compositing_ancestor_;
bool use_slow_path;
bool use_slow_path_;
};
GraphicsLayerUpdater::GraphicsLayerUpdater() : needs_rebuild_tree_(false) {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment