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

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

Issue 1010663002: CC Animations: Redirect all compositor animation requests to AnimationHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@introduce
Patch Set: Rebase and fix conflicts (HasPotentiallyRunningTransformAnimation) Created 5 years, 7 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/cc_tests.gyp ('k') | cc/layers/layer.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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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_H_ 5 #ifndef CC_LAYERS_LAYER_H_
6 #define CC_LAYERS_LAYER_H_ 6 #define CC_LAYERS_LAYER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 void SetMaskLayer(Layer* mask_layer); 130 void SetMaskLayer(Layer* mask_layer);
131 Layer* mask_layer() { return mask_layer_.get(); } 131 Layer* mask_layer() { return mask_layer_.get(); }
132 const Layer* mask_layer() const { return mask_layer_.get(); } 132 const Layer* mask_layer() const { return mask_layer_.get(); }
133 133
134 virtual void SetNeedsDisplayRect(const gfx::Rect& dirty_rect); 134 virtual void SetNeedsDisplayRect(const gfx::Rect& dirty_rect);
135 void SetNeedsDisplay() { SetNeedsDisplayRect(gfx::Rect(bounds())); } 135 void SetNeedsDisplay() { SetNeedsDisplayRect(gfx::Rect(bounds())); }
136 136
137 void SetOpacity(float opacity); 137 void SetOpacity(float opacity);
138 float opacity() const { return opacity_; } 138 float opacity() const { return opacity_; }
139 bool OpacityIsAnimating() const; 139 bool OpacityIsAnimating() const;
140 bool HasPotentiallyRunningOpacityAnimation() const;
140 virtual bool OpacityCanAnimateOnImplThread() const; 141 virtual bool OpacityCanAnimateOnImplThread() const;
141 142
142 void SetBlendMode(SkXfermode::Mode blend_mode); 143 void SetBlendMode(SkXfermode::Mode blend_mode);
143 SkXfermode::Mode blend_mode() const { return blend_mode_; } 144 SkXfermode::Mode blend_mode() const { return blend_mode_; }
144 145
145 bool uses_default_blend_mode() const { 146 bool uses_default_blend_mode() const {
146 return blend_mode_ == SkXfermode::kSrcOver_Mode; 147 return blend_mode_ == SkXfermode::kSrcOver_Mode;
147 } 148 }
148 149
149 // A layer is root for an isolated group when it and all its descendants are 150 // A layer is root for an isolated group when it and all its descendants are
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 } 182 }
182 183
183 void SetPositionConstraint(const LayerPositionConstraint& constraint); 184 void SetPositionConstraint(const LayerPositionConstraint& constraint);
184 const LayerPositionConstraint& position_constraint() const { 185 const LayerPositionConstraint& position_constraint() const {
185 return position_constraint_; 186 return position_constraint_;
186 } 187 }
187 188
188 void SetTransform(const gfx::Transform& transform); 189 void SetTransform(const gfx::Transform& transform);
189 const gfx::Transform& transform() const { return transform_; } 190 const gfx::Transform& transform() const { return transform_; }
190 bool TransformIsAnimating() const; 191 bool TransformIsAnimating() const;
192 bool HasPotentiallyRunningTransformAnimation() const;
191 bool AnimationsPreserveAxisAlignment() const; 193 bool AnimationsPreserveAxisAlignment() const;
192 bool transform_is_invertible() const { return transform_is_invertible_; } 194 bool transform_is_invertible() const { return transform_is_invertible_; }
193 195
194 void SetTransformOrigin(const gfx::Point3F&); 196 void SetTransformOrigin(const gfx::Point3F&);
195 gfx::Point3F transform_origin() const { return transform_origin_; } 197 gfx::Point3F transform_origin() const { return transform_origin_; }
196 198
199 bool ScrollOffsetAnimationWasInterrupted() const;
200
197 void SetScrollParent(Layer* parent); 201 void SetScrollParent(Layer* parent);
198 202
199 Layer* scroll_parent() { return scroll_parent_; } 203 Layer* scroll_parent() { return scroll_parent_; }
200 const Layer* scroll_parent() const { return scroll_parent_; } 204 const Layer* scroll_parent() const { return scroll_parent_; }
201 205
202 void AddScrollChild(Layer* child); 206 void AddScrollChild(Layer* child);
203 void RemoveScrollChild(Layer* child); 207 void RemoveScrollChild(Layer* child);
204 208
205 std::set<Layer*>* scroll_children() { return scroll_children_.get(); } 209 std::set<Layer*>* scroll_children() { return scroll_children_.get(); }
206 const std::set<Layer*>* scroll_children() const { 210 const std::set<Layer*>* scroll_children() const {
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 LayerTreeHost* layer_tree_host() { return layer_tree_host_; } 414 LayerTreeHost* layer_tree_host() { return layer_tree_host_; }
411 const LayerTreeHost* layer_tree_host() const { return layer_tree_host_; } 415 const LayerTreeHost* layer_tree_host() const { return layer_tree_host_; }
412 416
413 // Set the priority of all desired textures in this layer. 417 // Set the priority of all desired textures in this layer.
414 virtual void SetTexturePriorities(const PriorityCalculator& priority_calc) {} 418 virtual void SetTexturePriorities(const PriorityCalculator& priority_calc) {}
415 419
416 bool AddAnimation(scoped_ptr<Animation> animation); 420 bool AddAnimation(scoped_ptr<Animation> animation);
417 void PauseAnimation(int animation_id, double time_offset); 421 void PauseAnimation(int animation_id, double time_offset);
418 void RemoveAnimation(int animation_id); 422 void RemoveAnimation(int animation_id);
419 void RemoveAnimation(int animation_id, Animation::TargetProperty property); 423 void RemoveAnimation(int animation_id, Animation::TargetProperty property);
420 424 LayerAnimationController* layer_animation_controller() const {
421 LayerAnimationController* layer_animation_controller() {
422 return layer_animation_controller_.get(); 425 return layer_animation_controller_.get();
423 } 426 }
424 void SetLayerAnimationControllerForTest( 427 void SetLayerAnimationControllerForTest(
425 scoped_refptr<LayerAnimationController> controller); 428 scoped_refptr<LayerAnimationController> controller);
426 429
427 void set_layer_animation_delegate(AnimationDelegate* delegate) { 430 void set_layer_animation_delegate(AnimationDelegate* delegate) {
428 DCHECK(layer_animation_controller_); 431 DCHECK(layer_animation_controller_);
429 layer_animation_controller_->set_layer_animation_delegate(delegate); 432 layer_animation_controller_->set_layer_animation_delegate(delegate);
430 } 433 }
431 434
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 761
759 std::vector<FrameTimingRequest> frame_timing_requests_; 762 std::vector<FrameTimingRequest> frame_timing_requests_;
760 bool frame_timing_requests_dirty_; 763 bool frame_timing_requests_dirty_;
761 764
762 DISALLOW_COPY_AND_ASSIGN(Layer); 765 DISALLOW_COPY_AND_ASSIGN(Layer);
763 }; 766 };
764 767
765 } // namespace cc 768 } // namespace cc
766 769
767 #endif // CC_LAYERS_LAYER_H_ 770 #endif // CC_LAYERS_LAYER_H_
OLDNEW
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/layers/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698