Index: cc/trees/thread_proxy.h |
diff --git a/cc/trees/thread_proxy.h b/cc/trees/thread_proxy.h |
index 3cc905d43ddedb69da60eca00cd67b66b615fa2c..8013882f882f629e84b2336b573a163e1cd2da19 100644 |
--- a/cc/trees/thread_proxy.h |
+++ b/cc/trees/thread_proxy.h |
@@ -5,6 +5,8 @@ |
#ifndef CC_TREES_THREAD_PROXY_H_ |
#define CC_TREES_THREAD_PROXY_H_ |
+#include <string> |
+ |
#include "base/memory/scoped_ptr.h" |
#include "base/memory/weak_ptr.h" |
#include "base/time.h" |
@@ -12,7 +14,6 @@ |
#include "cc/base/completion_event.h" |
#include "cc/resources/resource_update_controller.h" |
#include "cc/scheduler/scheduler.h" |
-#include "cc/scheduler/vsync_time_source.h" |
#include "cc/trees/layer_tree_host_impl.h" |
#include "cc/trees/proxy.h" |
@@ -29,8 +30,7 @@ class Thread; |
class ThreadProxy : public Proxy, |
LayerTreeHostImplClient, |
SchedulerClient, |
- ResourceUpdateControllerClient, |
- VSyncProvider { |
+ ResourceUpdateControllerClient { |
public: |
static scoped_ptr<Proxy> Create(LayerTreeHost* layer_tree_host, |
scoped_ptr<Thread> impl_thread); |
@@ -59,6 +59,7 @@ class ThreadProxy : public Proxy, |
virtual skia::RefPtr<SkPicture> CapturePicture() OVERRIDE; |
virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; |
virtual bool CommitPendingForTesting() OVERRIDE; |
+ virtual std::string SchedulerStateAsStringForTesting() OVERRIDE; |
// LayerTreeHostImplClient implementation |
virtual void DidTryInitializeRendererOnImplThread( |
@@ -66,10 +67,7 @@ class ThreadProxy : public Proxy, |
scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE; |
virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; |
virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE; |
- virtual void OnVSyncParametersChanged(base::TimeTicks timebase, |
- base::TimeDelta interval) OVERRIDE; |
- virtual void BeginFrameOnImplThread(base::TimeTicks frame_time) |
- OVERRIDE; |
+ virtual void BeginFrameOnImplThread(base::TimeTicks frame_time) OVERRIDE; |
virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE; |
virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) OVERRIDE; |
virtual void SetNeedsRedrawOnImplThread() OVERRIDE; |
@@ -91,6 +89,7 @@ class ThreadProxy : public Proxy, |
virtual void DidActivatePendingTree() OVERRIDE; |
// SchedulerClient implementation |
+ virtual void SetNeedsBeginFrameOnImplThread(bool enable) OVERRIDE; |
virtual void ScheduledActionSendBeginFrameToMainThread() OVERRIDE; |
virtual ScheduledActionDrawAndSwapResult |
ScheduledActionDrawAndSwapIfPossible() OVERRIDE; |
@@ -106,17 +105,6 @@ class ThreadProxy : public Proxy, |
// ResourceUpdateControllerClient implementation |
virtual void ReadyToFinalizeTextureUpdates() OVERRIDE; |
- // VSyncProvider implementation |
- virtual void RequestVSyncNotification(VSyncClient* client) OVERRIDE; |
- |
- int MaxFramesPendingForTesting() const { |
- return scheduler_on_impl_thread_->MaxFramesPending(); |
- } |
- |
- int NumFramesPendingForTesting() const { |
- return scheduler_on_impl_thread_->NumFramesPendingForTesting(); |
- } |
- |
private: |
ThreadProxy(LayerTreeHost* layer_tree_host, scoped_ptr<Thread> impl_thread); |
@@ -143,16 +131,10 @@ class ThreadProxy : public Proxy, |
const RendererCapabilities& capabilities); |
// Called on impl thread. |
- struct ReadbackRequest { |
- CompletionEvent completion; |
- bool success; |
- void* pixels; |
- gfx::Rect rect; |
- }; |
- struct CommitPendingRequest { |
- CompletionEvent completion; |
- bool commit_pending; |
- }; |
+ struct ReadbackRequest; |
+ struct CommitPendingRequest; |
+ struct SchedulerStateRequest; |
+ |
void ForceCommitOnImplThread(CompletionEvent* completion); |
void StartCommitOnImplThread( |
CompletionEvent* completion, |
@@ -182,6 +164,8 @@ class ThreadProxy : public Proxy, |
void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); |
void CheckOutputSurfaceStatusOnImplThread(); |
void CommitPendingOnImplThreadForTesting(CommitPendingRequest* request); |
+ void SchedulerStateAsStringOnImplThreadForTesting( |
+ SchedulerStateRequest* request); |
void CapturePictureOnImplThread(CompletionEvent* completion, |
skia::RefPtr<SkPicture>* picture); |
void AsValueOnImplThread(CompletionEvent* completion, |
@@ -250,7 +234,6 @@ class ThreadProxy : public Proxy, |
bool throttle_frame_production_; |
bool begin_frame_scheduling_enabled_; |
bool using_synchronous_renderer_compositor_; |
- VSyncClient* vsync_client_; |
bool inside_draw_; |