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

Side by Side Diff: cc/layers/layer_impl.h

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 unified diff | Download patch
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_LAYERS_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_LAYER_IMPL_H_
6 #define CC_LAYERS_LAYER_IMPL_H_ 6 #define CC_LAYERS_LAYER_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 // LayerAnimationValueProvider implementation. 102 // LayerAnimationValueProvider implementation.
103 gfx::ScrollOffset ScrollOffsetForAnimation() const override; 103 gfx::ScrollOffset ScrollOffsetForAnimation() const override;
104 104
105 // LayerAnimationValueObserver implementation. 105 // LayerAnimationValueObserver implementation.
106 void OnFilterAnimated(const FilterOperations& filters) override; 106 void OnFilterAnimated(const FilterOperations& filters) override;
107 void OnOpacityAnimated(float opacity) override; 107 void OnOpacityAnimated(float opacity) override;
108 void OnTransformAnimated(const gfx::Transform& transform) override; 108 void OnTransformAnimated(const gfx::Transform& transform) override;
109 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) override; 109 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) override;
110 void OnAnimationWaitingForDeletion() override; 110 void OnAnimationWaitingForDeletion() override;
111 void OnScrollOffsetAnimationRemoved() override;
112 bool IsActive() const override; 111 bool IsActive() const override;
113 112
114 // AnimationDelegate implementation. 113 // AnimationDelegate implementation.
115 void NotifyAnimationStarted(base::TimeTicks monotonic_time, 114 void NotifyAnimationStarted(base::TimeTicks monotonic_time,
116 Animation::TargetProperty target_property, 115 Animation::TargetProperty target_property,
117 int group) override{}; 116 int group) override{};
118 void NotifyAnimationFinished(base::TimeTicks monotonic_time, 117 void NotifyAnimationFinished(base::TimeTicks monotonic_time,
119 Animation::TargetProperty target_property, 118 Animation::TargetProperty target_property,
120 int group) override; 119 int group) override;
121 120
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 LayerImpl* scrollbar_clip_layer, 397 LayerImpl* scrollbar_clip_layer,
399 bool on_resize) const; 398 bool on_resize) const;
400 void SetScrollDelta(const gfx::Vector2dF& scroll_delta); 399 void SetScrollDelta(const gfx::Vector2dF& scroll_delta);
401 gfx::Vector2dF ScrollDelta() const; 400 gfx::Vector2dF ScrollDelta() const;
402 401
403 gfx::ScrollOffset TotalScrollOffset() const; 402 gfx::ScrollOffset TotalScrollOffset() const;
404 403
405 void SetSentScrollDelta(const gfx::Vector2dF& sent_scroll_delta); 404 void SetSentScrollDelta(const gfx::Vector2dF& sent_scroll_delta);
406 gfx::Vector2dF sent_scroll_delta() const { return sent_scroll_delta_; } 405 gfx::Vector2dF sent_scroll_delta() const { return sent_scroll_delta_; }
407 406
408 void ClearScrollDeltaAtActivation();
409
410 // Returns the delta of the scroll that was outside of the bounds of the 407 // Returns the delta of the scroll that was outside of the bounds of the
411 // initial scroll 408 // initial scroll
412 gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll); 409 gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll);
413 410
414 void SetScrollClipLayer(int scroll_clip_layer_id); 411 void SetScrollClipLayer(int scroll_clip_layer_id);
415 LayerImpl* scroll_clip_layer() const { return scroll_clip_layer_; } 412 LayerImpl* scroll_clip_layer() const { return scroll_clip_layer_; }
416 bool scrollable() const { return !!scroll_clip_layer_; } 413 bool scrollable() const { return !!scroll_clip_layer_; }
417 414
418 void set_user_scrollable_horizontal(bool scrollable) { 415 void set_user_scrollable_horizontal(bool scrollable) {
419 user_scrollable_horizontal_ = scrollable; 416 user_scrollable_horizontal_ = scrollable;
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 // Tracks if drawing-related properties have changed since last redraw. 639 // Tracks if drawing-related properties have changed since last redraw.
643 bool layer_property_changed_ : 1; 640 bool layer_property_changed_ : 1;
644 641
645 bool masks_to_bounds_ : 1; 642 bool masks_to_bounds_ : 1;
646 bool contents_opaque_ : 1; 643 bool contents_opaque_ : 1;
647 bool is_root_for_isolated_group_ : 1; 644 bool is_root_for_isolated_group_ : 1;
648 bool use_parent_backface_visibility_ : 1; 645 bool use_parent_backface_visibility_ : 1;
649 bool draw_checkerboard_for_missing_tiles_ : 1; 646 bool draw_checkerboard_for_missing_tiles_ : 1;
650 bool draws_content_ : 1; 647 bool draws_content_ : 1;
651 bool hide_layer_and_subtree_ : 1; 648 bool hide_layer_and_subtree_ : 1;
652 bool clear_scroll_delta_at_activation_ : 1;
653 649
654 // Cache transform_'s invertibility. 650 // Cache transform_'s invertibility.
655 bool transform_is_invertible_ : 1; 651 bool transform_is_invertible_ : 1;
656 652
657 // Set for the layer that other layers are fixed to. 653 // Set for the layer that other layers are fixed to.
658 bool is_container_for_fixed_position_layers_ : 1; 654 bool is_container_for_fixed_position_layers_ : 1;
659 Region non_fast_scrollable_region_; 655 Region non_fast_scrollable_region_;
660 Region touch_event_handler_region_; 656 Region touch_event_handler_region_;
661 SkColor background_color_; 657 SkColor background_color_;
662 658
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 DrawProperties<LayerImpl> draw_properties_; 719 DrawProperties<LayerImpl> draw_properties_;
724 720
725 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; 721 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_;
726 scoped_ptr<RenderSurfaceImpl> render_surface_; 722 scoped_ptr<RenderSurfaceImpl> render_surface_;
727 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 723 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
728 }; 724 };
729 725
730 } // namespace cc 726 } // namespace cc
731 727
732 #endif // CC_LAYERS_LAYER_IMPL_H_ 728 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698