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

Unified Diff: cc/trees/layer_tree_host_impl.h

Issue 947033002: CC Animations: Establish AnimationHost, AnimationTimeline and AnimationPlayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set up impl-only timelines for ScrollOffset animations Created 5 years, 8 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/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.h
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index 6bbc488c18a329aca3fc59cf7bd0cb63be29be46..3c16c0ee7e1efa9f383152ec81e8448682a9b92e 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -36,6 +36,7 @@
#include "cc/resources/ui_resource_client.h"
#include "cc/scheduler/commit_earlyout_reason.h"
#include "cc/scheduler/draw_result.h"
+#include "cc/trees/layer_tree_mutators_client.h"
#include "cc/trees/layer_tree_settings.h"
#include "cc/trees/proxy.h"
#include "skia/ext/refptr.h"
@@ -48,6 +49,7 @@ class ScrollOffset;
namespace cc {
+class AnimationHost;
class CompletionEvent;
class CompositorFrameMetadata;
class DebugRectHistory;
@@ -137,7 +139,8 @@ class CC_EXPORT LayerTreeHostImpl
public OutputSurfaceClient,
public TopControlsManagerClient,
public ScrollbarAnimationControllerClient,
- public base::SupportsWeakPtr<LayerTreeHostImpl> {
+ public base::SupportsWeakPtr<LayerTreeHostImpl>,
+ public LayerTreeMutatorsClient {
public:
static scoped_ptr<LayerTreeHostImpl> Create(
const LayerTreeSettings& settings,
@@ -223,6 +226,37 @@ class CC_EXPORT LayerTreeHostImpl
void DidAnimateScrollOffset();
void SetViewportDamage(const gfx::Rect& damage_rect);
+ void SetTreeLayerFilterMutated(int layer_id,
+ LayerTreeImpl* tree,
+ const FilterOperations& filters);
+ void SetTreeLayerOpacityMutated(int layer_id,
+ LayerTreeImpl* tree,
+ float opacity);
+ void SetTreeLayerTransformMutated(int layer_id,
+ LayerTreeImpl* tree,
+ const gfx::Transform& transform);
+ void SetTreeLayerScrollOffsetMutated(int layer_id,
+ LayerTreeImpl* tree,
+ const gfx::ScrollOffset& scroll_offset);
+
+ // LayerTreeMutatorsClient implementation.
+ bool IsLayerInActiveTree(int layer_id) const override;
+ bool IsLayerInPendingTree(int layer_id) const override;
+ void SetMutatorsNeedCommit() override;
+ void SetLayerFilterMutated(int layer_id,
+ bool affects_active_tree,
+ const FilterOperations& filters) override;
+ void SetLayerOpacityMutated(int layer_id,
+ bool affects_active_tree,
+ float opacity) override;
+ void SetLayerTransformMutated(int layer_id,
+ bool affects_active_tree,
+ const gfx::Transform& transform) override;
+ void SetLayerScrollOffsetMutated(
+ int layer_id,
+ bool active_tree,
+ const gfx::ScrollOffset& scroll_offset) override;
+
virtual void PrepareTiles();
// Returns DRAW_SUCCESS unless problems occured preparing the frame, and we
@@ -426,6 +460,7 @@ class CC_EXPORT LayerTreeHostImpl
AnimationRegistrar* animation_registrar() const {
return animation_registrar_.get();
}
+ AnimationHost* animation_host() const { return animation_host_.get(); }
void SetDebugState(const LayerTreeDebugState& new_debug_state);
const LayerTreeDebugState& debug_state() const { return debug_state_; }
@@ -734,6 +769,7 @@ class CC_EXPORT LayerTreeHostImpl
base::TimeDelta begin_impl_frame_interval_;
scoped_ptr<AnimationRegistrar> animation_registrar_;
+ scoped_ptr<AnimationHost> animation_host_;
std::set<ScrollbarAnimationController*> scrollbar_animation_controllers_;
RenderingStatsInstrumentation* rendering_stats_instrumentation_;
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698