#include "cc/animation/animation_events.h"
#include "cc/base/completion_event.h"
#include "cc/resources/resource_update_controller.h"
-#include "cc/scheduler/rolling_time_delta_history.h"
#include "cc/scheduler/scheduler.h"
#include "cc/trees/layer_tree_host_impl.h"
#include "cc/trees/proxy.h"
+#include "cc/trees/proxy_timing_history.h"
namespace base {
class SingleThreadTaskRunner;
virtual scoped_ptr<base::Value> SchedulerStateAsValueForTesting() OVERRIDE;
// LayerTreeHostImplClient implementation
+ virtual void UpdateRendererCapabilitiesOnImplThread() OVERRIDE;
virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE;
virtual void DidSwapBuffersOnImplThread() OVERRIDE {}
virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE;
};
// Called on main thread.
+ void SetRendererCapabilitiesMainThreadCopy(
+ const RendererCapabilities& capabilities);
void BeginMainFrame(
scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state);
void DidCommitAndDrawFrame();
void BeginMainFrameAbortedOnImplThread(bool did_handle);
void RequestReadbackOnImplThread(ReadbackRequest* request);
void FinishAllRenderingOnImplThread(CompletionEvent* completion);
- void InitializeImplOnImplThread(CompletionEvent* completion,
- int layer_tree_host_id);
+ void InitializeImplOnImplThread(CompletionEvent* completion);
void SetLayerTreeHostClientReadyOnImplThread();
void SetVisibleOnImplThread(CompletionEvent* completion, bool visible);
void UpdateBackgroundAnimateTicking();
LayerTreeHost* layer_tree_host;
bool commit_waits_for_activation;
bool main_thread_inside_commit;
+
+ base::TimeTicks last_monotonic_frame_begin_time;
};
// Use accessors instead of this variable directly.
MainThreadOrBlockedMainThread main_thread_or_blocked_vars_unsafe_;
const MainThreadOrBlockedMainThread& blocked_main() const;
struct CompositorThreadOnly {
- explicit CompositorThreadOnly(ThreadProxy* proxy);
+ CompositorThreadOnly(ThreadProxy* proxy, int layer_tree_host_id);
~CompositorThreadOnly();
+ const int layer_tree_host_id;
+
// Copy of the main thread side contents texture manager for work
// that needs to be done on the compositor thread.
PrioritizedResourceManager* contents_texture_manager;
bool input_throttled_until_commit;
+ // Set when we freeze animations to avoid checkerboarding.
+ bool animations_frozen_until_next_draw;
+ base::TimeTicks animation_freeze_time;
+
base::TimeTicks smoothness_takes_priority_expiration_time;
bool renew_tree_priority_pending;
- RollingTimeDeltaHistory draw_duration_history;
- RollingTimeDeltaHistory begin_main_frame_to_commit_duration_history;
- RollingTimeDeltaHistory commit_to_activate_duration_history;
-
- // Used for computing samples added to
- // begin_main_frame_to_commit_duration_history_ and
- // activation_duration_history_.
- base::TimeTicks begin_main_frame_sent_time;
- base::TimeTicks commit_complete_time;
+ ProxyTimingHistory timing_history;
scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl;
base::WeakPtrFactory<ThreadProxy> weak_factory;