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

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

Issue 361143002: Impl thread smooth scrolling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « cc/input/input_handler.h ('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
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "cc/animation/animation_delegate.h"
14 #include "cc/animation/layer_animation_controller.h" 15 #include "cc/animation/layer_animation_controller.h"
15 #include "cc/animation/layer_animation_value_observer.h" 16 #include "cc/animation/layer_animation_value_observer.h"
16 #include "cc/animation/layer_animation_value_provider.h" 17 #include "cc/animation/layer_animation_value_provider.h"
17 #include "cc/base/cc_export.h" 18 #include "cc/base/cc_export.h"
18 #include "cc/base/region.h" 19 #include "cc/base/region.h"
19 #include "cc/base/scoped_ptr_vector.h" 20 #include "cc/base/scoped_ptr_vector.h"
20 #include "cc/input/input_handler.h" 21 #include "cc/input/input_handler.h"
21 #include "cc/layers/draw_properties.h" 22 #include "cc/layers/draw_properties.h"
22 #include "cc/layers/layer_lists.h" 23 #include "cc/layers/layer_lists.h"
23 #include "cc/layers/layer_position_constraint.h" 24 #include "cc/layers/layer_position_constraint.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 struct AppendQuadsData; 59 struct AppendQuadsData;
59 60
60 enum DrawMode { 61 enum DrawMode {
61 DRAW_MODE_NONE, 62 DRAW_MODE_NONE,
62 DRAW_MODE_HARDWARE, 63 DRAW_MODE_HARDWARE,
63 DRAW_MODE_SOFTWARE, 64 DRAW_MODE_SOFTWARE,
64 DRAW_MODE_RESOURCELESS_SOFTWARE 65 DRAW_MODE_RESOURCELESS_SOFTWARE
65 }; 66 };
66 67
67 class CC_EXPORT LayerImpl : public LayerAnimationValueObserver, 68 class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
68 public LayerAnimationValueProvider { 69 public LayerAnimationValueProvider,
70 public AnimationDelegate {
69 public: 71 public:
70 // Allows for the ownership of the total scroll offset to be delegated outside 72 // Allows for the ownership of the total scroll offset to be delegated outside
71 // of the layer. 73 // of the layer.
72 class ScrollOffsetDelegate { 74 class ScrollOffsetDelegate {
73 public: 75 public:
74 virtual void SetTotalScrollOffset(const gfx::Vector2dF& new_value) = 0; 76 virtual void SetTotalScrollOffset(const gfx::Vector2dF& new_value) = 0;
75 virtual gfx::Vector2dF GetTotalScrollOffset() = 0; 77 virtual gfx::Vector2dF GetTotalScrollOffset() = 0;
76 virtual bool IsExternalFlingActive() const = 0; 78 virtual bool IsExternalFlingActive() const = 0;
77 }; 79 };
78 80
(...skipping 16 matching lines...) Expand all
95 97
96 // LayerAnimationValueObserver implementation. 98 // LayerAnimationValueObserver implementation.
97 virtual void OnFilterAnimated(const FilterOperations& filters) OVERRIDE; 99 virtual void OnFilterAnimated(const FilterOperations& filters) OVERRIDE;
98 virtual void OnOpacityAnimated(float opacity) OVERRIDE; 100 virtual void OnOpacityAnimated(float opacity) OVERRIDE;
99 virtual void OnTransformAnimated(const gfx::Transform& transform) OVERRIDE; 101 virtual void OnTransformAnimated(const gfx::Transform& transform) OVERRIDE;
100 virtual void OnScrollOffsetAnimated( 102 virtual void OnScrollOffsetAnimated(
101 const gfx::Vector2dF& scroll_offset) OVERRIDE; 103 const gfx::Vector2dF& scroll_offset) OVERRIDE;
102 virtual void OnAnimationWaitingForDeletion() OVERRIDE; 104 virtual void OnAnimationWaitingForDeletion() OVERRIDE;
103 virtual bool IsActive() const OVERRIDE; 105 virtual bool IsActive() const OVERRIDE;
104 106
107 // AnimationDelegate implementation.
108 virtual void NotifyAnimationStarted(
109 base::TimeTicks monotonic_time,
110 Animation::TargetProperty target_property) OVERRIDE{};
111 virtual void NotifyAnimationFinished(
112 base::TimeTicks monotonic_time,
113 Animation::TargetProperty target_property) OVERRIDE;
114
105 // Tree structure. 115 // Tree structure.
106 LayerImpl* parent() { return parent_; } 116 LayerImpl* parent() { return parent_; }
107 const LayerImpl* parent() const { return parent_; } 117 const LayerImpl* parent() const { return parent_; }
108 const OwnedLayerImplList& children() const { return children_; } 118 const OwnedLayerImplList& children() const { return children_; }
109 OwnedLayerImplList& children() { return children_; } 119 OwnedLayerImplList& children() { return children_; }
110 LayerImpl* child_at(size_t index) const { return children_[index]; } 120 LayerImpl* child_at(size_t index) const { return children_[index]; }
111 void AddChild(scoped_ptr<LayerImpl> child); 121 void AddChild(scoped_ptr<LayerImpl> child);
112 scoped_ptr<LayerImpl> RemoveChild(LayerImpl* child); 122 scoped_ptr<LayerImpl> RemoveChild(LayerImpl* child);
113 void SetParent(LayerImpl* parent); 123 void SetParent(LayerImpl* parent);
114 124
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 DrawProperties<LayerImpl> draw_properties_; 700 DrawProperties<LayerImpl> draw_properties_;
691 701
692 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; 702 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_;
693 703
694 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 704 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
695 }; 705 };
696 706
697 } // namespace cc 707 } // namespace cc
698 708
699 #endif // CC_LAYERS_LAYER_IMPL_H_ 709 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/input/input_handler.h ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698