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

Unified Diff: cc/trees/layer_tree_host_impl.h

Issue 267783004: Refactoring the way begin frame sources inside scheduler work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Scheduler tests now pass and the code is cleaner. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/fake_layer_tree_host_impl_client.h ('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 494342e5194f7812e185a2374cd5fcc92ad2efa9..3168fd905470bbe841ae25ce61d6c7a9ac40bfed 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -32,6 +32,7 @@
#include "cc/resources/resource_provider.h"
#include "cc/resources/tile_manager.h"
#include "cc/scheduler/draw_result.h"
+#include "cc/scheduler/frame_source.h"
#include "skia/ext/refptr.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/rect.h"
@@ -43,7 +44,6 @@ class CompositorFrameMetadata;
class DebugRectHistory;
class FrameRateCounter;
class LayerImpl;
-class LayerTreeHostImplTimeSourceAdapter;
class LayerTreeImpl;
class MemoryHistory;
class PageScaleAnimation;
@@ -64,13 +64,10 @@ class LayerTreeHostImplClient {
public:
virtual void UpdateRendererCapabilitiesOnImplThread() = 0;
virtual void DidLoseOutputSurfaceOnImplThread() = 0;
- virtual void CommitVSyncParameters(base::TimeTicks timebase,
- base::TimeDelta interval) = 0;
virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) = 0;
virtual void SetMaxSwapsPendingOnImplThread(int max) = 0;
virtual void DidSwapBuffersOnImplThread() = 0;
virtual void DidSwapBuffersCompleteOnImplThread() = 0;
- virtual void BeginFrame(const BeginFrameArgs& args) = 0;
virtual void OnCanDrawStateChanged(bool can_draw) = 0;
virtual void NotifyReadyToActivate() = 0;
// Please call these 3 functions through
@@ -110,6 +107,7 @@ class CC_EXPORT LayerTreeHostImpl
public OutputSurfaceClient,
public TopControlsManagerClient,
public ScrollbarAnimationControllerClient,
+ public BaseBeginFrameSource,
public base::SupportsWeakPtr<LayerTreeHostImpl> {
public:
static scoped_ptr<LayerTreeHostImpl> Create(
@@ -182,7 +180,6 @@ class CC_EXPORT LayerTreeHostImpl
virtual void UpdateAnimationState(bool start_ready_animations);
void ActivateAnimations();
void MainThreadHasStoppedFlinging();
- void UpdateBackgroundAnimateTicking(bool should_background_tick);
void DidAnimateScrollOffset();
void SetViewportDamage(const gfx::Rect& damage_rect);
@@ -259,6 +256,10 @@ class CC_EXPORT LayerTreeHostImpl
virtual void SetTreeActivationCallback(const base::Closure& callback)
OVERRIDE;
+ // BeginFrameSource implementation.
+ virtual void OnGenerateChange(bool generate_frames) OVERRIDE;
+ virtual std::string TypeString() const OVERRIDE;
+
// Called from LayerTreeImpl.
void OnCanDrawStateChangedForTree();
@@ -284,7 +285,6 @@ class CC_EXPORT LayerTreeHostImpl
const RendererCapabilitiesImpl& GetRendererCapabilities() const;
virtual bool SwapBuffers(const FrameData& frame);
- void SetNeedsBeginFrame(bool enable);
virtual void WillBeginImplFrame(const BeginFrameArgs& args);
void DidModifyTilePriorities();
@@ -606,9 +606,6 @@ class CC_EXPORT LayerTreeHostImpl
scoped_ptr<PageScaleAnimation> page_scale_animation_;
- // This is used for ticking animations slowly when hidden.
- scoped_ptr<LayerTreeHostImplTimeSourceAdapter> time_source_client_adapter_;
-
scoped_ptr<FrameRateCounter> fps_counter_;
scoped_ptr<PaintTimeCounter> paint_time_counter_;
scoped_ptr<MemoryHistory> memory_history_;
« no previous file with comments | « cc/test/fake_layer_tree_host_impl_client.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698