Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5244)

Unified Diff: cc/layers/layer.cc

Issue 864003002: cc: Make LayerAnimationController keep state for clearing scroll delta (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 3817115f709780042a40cecba6ec00312185b0b2..45e8a83bffd7e02df055d7aaa70f4c8c25f1846a 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -71,7 +71,6 @@ Layer::Layer()
force_render_surface_(false),
transform_is_invertible_(true),
has_render_surface_(false),
- clear_impl_scroll_delta_(false),
background_color_(0),
opacity_(1.f),
blend_mode_(SkXfermode::kSrcOver_Mode),
@@ -971,10 +970,9 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
// in LayerImpl::ApplyScrollDeltasSinceBeginMainFrame in a separate tree walk.
if (layer->layer_tree_impl()->settings().impl_side_painting) {
layer->SetScrollOffset(scroll_offset_);
- if (clear_impl_scroll_delta_)
- layer->ClearScrollDeltaAtActivation();
} else {
- if (clear_impl_scroll_delta_) {
+ if (layer_animation_controller_
+ ->scroll_offset_animation_was_interrupted()) {
layer->SetScrollOffsetAndDelta(scroll_offset_, gfx::Vector2dF());
} else {
layer->SetScrollOffsetAndDelta(
@@ -982,7 +980,6 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
}
layer->SetSentScrollDelta(gfx::Vector2dF());
}
- clear_impl_scroll_delta_ = false;
// Wrap the copy_requests_ in a PostTask to the main thread.
ScopedPtrVector<CopyOutputRequest> main_thread_copy_requests;
@@ -1152,10 +1149,6 @@ void Layer::OnAnimationWaitingForDeletion() {
SetNeedsPushProperties();
}
-void Layer::OnScrollOffsetAnimationRemoved() {
- clear_impl_scroll_delta_ = true;
-}
-
bool Layer::IsActive() const {
return true;
}
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698