diff options
author | aelias <aelias@chromium.org> | 2016-03-14 22:10:30 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-15 05:11:42 +0000 |
commit | a9aad960d0bf105c2153a517cedcc57e4d53b0b5 (patch) | |
tree | e6605471d6dc59c2604b0b8fa1c09e6d70538ec2 /cc/layers/layer.cc | |
parent | 5e7d057ea31f81d2658c3783ce41c8d458821e0f (diff) | |
download | chromium_src-a9aad960d0bf105c2153a517cedcc57e4d53b0b5.zip chromium_src-a9aad960d0bf105c2153a517cedcc57e4d53b0b5.tar.gz chromium_src-a9aad960d0bf105c2153a517cedcc57e4d53b0b5.tar.bz2 |
Delete scrollCompensationAdjustment.
This feature was added to compensate for fixed-position layers getting
positioned at integer positions but counterscrolled by a full,
fractional amount. It wound up getting unused because it caused a
performance regression due to defeating the "aborted commit"
optimization during scrolling (every scroll increment with a fractional
change would cause a commit).
There are two ways we can move forward with main-thread fractional
scroll support from here, either 1) have CC automatically compute the
fractional part on the impl thread, or 2) change Blink so that
fixed-position elements don't include the scroll offset in their layout
position at all. Either way, this scroll compensation feature is dead
code, so we can delete it now.
BUG=414283
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1385123003
Cr-Commit-Position: refs/heads/master@{#381180}
Diffstat (limited to 'cc/layers/layer.cc')
-rw-r--r-- | cc/layers/layer.cc | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc index dc02b4c..d8d7e51 100644 --- a/cc/layers/layer.cc +++ b/cc/layers/layer.cc @@ -835,18 +835,6 @@ void Layer::SetScrollOffset(const gfx::ScrollOffset& scroll_offset) { SetNeedsCommit(); } -void Layer::SetScrollCompensationAdjustment( - const gfx::Vector2dF& scroll_compensation_adjustment) { - if (scroll_compensation_adjustment_ == scroll_compensation_adjustment) - return; - scroll_compensation_adjustment_ = scroll_compensation_adjustment; - SetNeedsCommit(); -} - -gfx::Vector2dF Layer::ScrollCompensationAdjustment() const { - return scroll_compensation_adjustment_; -} - void Layer::SetScrollOffsetFromImplSide( const gfx::ScrollOffset& scroll_offset) { DCHECK(IsPropertyChangeAllowed()); @@ -1283,7 +1271,6 @@ void Layer::PushPropertiesTo(LayerImpl* layer) { ->property_trees() ->scroll_tree.synced_scroll_offset(layer->id()) ->set_clobber_active_value(); - layer->SetScrollCompensationAdjustment(ScrollCompensationAdjustment()); { TRACE_EVENT0("cc", "Layer::PushPropertiesTo::CopyOutputRequests"); @@ -1529,8 +1516,6 @@ void Layer::LayerSpecificPropertiesToProto(proto::LayerProperties* proto) { } ScrollOffsetToProto(scroll_offset_, base->mutable_scroll_offset()); - Vector2dFToProto(scroll_compensation_adjustment_, - base->mutable_scroll_compensation_adjustment()); // TODO(nyquist): Figure out what to do with CopyRequests. // See crbug.com/570374. @@ -1634,8 +1619,6 @@ void Layer::FromLayerSpecificPropertiesProto( } scroll_offset_ = ProtoToScrollOffset(base.scroll_offset()); - scroll_compensation_adjustment_ = - ProtoToVector2dF(base.scroll_compensation_adjustment()); update_rect_.Union(ProtoToRect(base.update_rect())); } |