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

Unified Diff: cc/trees/layer_tree_host_impl.h

Issue 1039533002: cc: Add support for sending BeginFrames for video. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@misc_video_refactoring
Patch Set: Remove visibility updates. 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
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 276aefdc8dc768d2e8b1ecaba6def26bd70b1ae4..f196b72c4ca1e99c8921ad3391eec2bc364b1082 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -35,6 +35,7 @@
#include "cc/resources/ui_resource_client.h"
#include "cc/scheduler/commit_earlyout_reason.h"
#include "cc/scheduler/draw_result.h"
+#include "cc/scheduler/video_frame_controller.h"
#include "cc/trees/layer_tree_settings.h"
#include "cc/trees/proxy.h"
#include "skia/ext/refptr.h"
@@ -104,6 +105,7 @@ class LayerTreeHostImplClient {
virtual void SetNeedsAnimateOnImplThread() = 0;
virtual void SetNeedsCommitOnImplThread() = 0;
virtual void SetNeedsPrepareTilesOnImplThread() = 0;
+ virtual void SetVideoNeedsBeginFrames(bool needs_begin_frames) = 0;
virtual void PostAnimationEventsToMainThreadOnImplThread(
scoped_ptr<AnimationEventsVector> events) = 0;
// Returns true if resources were deleted by this call.
@@ -136,6 +138,7 @@ class CC_EXPORT LayerTreeHostImpl
public OutputSurfaceClient,
public TopControlsManagerClient,
public ScrollbarAnimationControllerClient,
+ public VideoFrameControllerClient,
public base::SupportsWeakPtr<LayerTreeHostImpl> {
public:
static scoped_ptr<LayerTreeHostImpl> Create(
@@ -278,6 +281,10 @@ class CC_EXPORT LayerTreeHostImpl
base::TimeDelta delay) override;
void SetNeedsRedrawForScrollbarAnimation() override;
+ // VideoBeginFrameSource implementation.
+ void AddVideoFrameController(VideoFrameController* controller) override;
+ void RemoveVideoFrameController(VideoFrameController* controller) override;
+
// OutputSurfaceClient implementation.
void CommitVSyncParameters(base::TimeTicks timebase,
base::TimeDelta interval) override;
@@ -587,6 +594,7 @@ class CC_EXPORT LayerTreeHostImpl
// Scroll by preferring to move the inner viewport first, only moving the
// outer if the inner is at its scroll extents.
void ScrollViewportInnerFirst(gfx::Vector2dF scroll_delta);
+
void AnimatePageScale(base::TimeTicks monotonic_time);
void AnimateScrollbars(base::TimeTicks monotonic_time);
void AnimateTopControls(base::TimeTicks monotonic_time);
@@ -740,6 +748,7 @@ class CC_EXPORT LayerTreeHostImpl
scoped_ptr<AnimationRegistrar> animation_registrar_;
std::set<ScrollbarAnimationController*> scrollbar_animation_controllers_;
+ std::set<VideoFrameController*> video_frame_controllers_;
RenderingStatsInstrumentation* rendering_stats_instrumentation_;
MicroBenchmarkControllerImpl micro_benchmark_controller_;

Powered by Google App Engine
This is Rietveld 408576698