| Index: cc/trees/thread_proxy.h
|
| diff --git a/cc/trees/thread_proxy.h b/cc/trees/thread_proxy.h
|
| index 2150d8286f46f5eb809c9548806f4ae50ac82748..2c9aefe9c20a3bf63442fe7909d2911868fd96e2 100644
|
| --- a/cc/trees/thread_proxy.h
|
| +++ b/cc/trees/thread_proxy.h
|
| @@ -70,6 +70,7 @@ class ThreadProxy : public Proxy,
|
| virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE;
|
| virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE;
|
| virtual void BeginFrameOnImplThread(const BeginFrameArgs& args) OVERRIDE;
|
| + virtual void DidBeginFrameDeadlineOnImplThread() OVERRIDE;
|
| virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE;
|
| virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) OVERRIDE;
|
| virtual void SetNeedsRedrawOnImplThread() OVERRIDE;
|
| @@ -93,10 +94,12 @@ class ThreadProxy : public Proxy,
|
| // SchedulerClient implementation
|
| virtual void SetNeedsBeginFrameOnImplThread(bool enable) OVERRIDE;
|
| virtual void ScheduledActionSendBeginFrameToMainThread() OVERRIDE;
|
| - virtual ScheduledActionDrawAndSwapResult
|
| + virtual DrawSwapReadbackResult
|
| ScheduledActionDrawAndSwapIfPossible() OVERRIDE;
|
| - virtual ScheduledActionDrawAndSwapResult ScheduledActionDrawAndSwapForced()
|
| - OVERRIDE;
|
| + virtual DrawSwapReadbackResult
|
| + ScheduledActionDrawAndSwapForced() OVERRIDE;
|
| + virtual DrawSwapReadbackResult
|
| + ScheduledActionDrawAndReadback() OVERRIDE;
|
| virtual void ScheduledActionCommit() OVERRIDE;
|
| virtual void ScheduledActionCheckForCompletedTileUploads() OVERRIDE;
|
| virtual void ScheduledActionActivatePendingTreeIfNeeded() OVERRIDE;
|
| @@ -106,6 +109,8 @@ class ThreadProxy : public Proxy,
|
| virtual base::TimeDelta DrawDurationEstimate() OVERRIDE;
|
| virtual base::TimeDelta BeginFrameToCommitDurationEstimate() OVERRIDE;
|
| virtual base::TimeDelta CommitToActivateDurationEstimate() OVERRIDE;
|
| + virtual void PostBeginFrameDeadline(const base::Closure& closure,
|
| + base::TimeTicks deadline) OVERRIDE;
|
|
|
| // ResourceUpdateControllerClient implementation
|
| virtual void ReadyToFinalizeTextureUpdates() OVERRIDE;
|
| @@ -141,13 +146,14 @@ class ThreadProxy : public Proxy,
|
| struct CommitPendingRequest;
|
| struct SchedulerStateRequest;
|
|
|
| - void ForceCommitOnImplThread(CompletionEvent* completion);
|
| + void ForceCommitForReadbackOnImplThread(
|
| + CompletionEvent* completion,
|
| + ReadbackRequest *request);
|
| void StartCommitOnImplThread(
|
| CompletionEvent* completion,
|
| ResourceUpdateQueue* queue,
|
| scoped_refptr<cc::ContextProvider> offscreen_context_provider);
|
| void BeginFrameAbortedByMainThreadOnImplThread();
|
| - void RequestReadbackOnImplThread(ReadbackRequest* request);
|
| void FinishAllRenderingOnImplThread(CompletionEvent* completion);
|
| void InitializeImplOnImplThread(CompletionEvent* completion);
|
| void SetLayerTreeHostClientReadyOnImplThread();
|
| @@ -165,8 +171,8 @@ class ThreadProxy : public Proxy,
|
| void LayerTreeHostClosedOnImplThread(CompletionEvent* completion);
|
| void AcquireLayerTexturesForMainThreadOnImplThread(
|
| CompletionEvent* completion);
|
| - ScheduledActionDrawAndSwapResult ScheduledActionDrawAndSwapInternal(
|
| - bool forced_draw);
|
| + DrawSwapReadbackResult ScheduledActionDrawSwapReadbackInternal(
|
| + bool forced_draw, bool swap_requested, bool readback_requested);
|
| void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion);
|
| void CheckOutputSurfaceStatusOnImplThread();
|
| void CommitPendingOnImplThreadForTesting(CommitPendingRequest* request);
|
| @@ -210,12 +216,16 @@ class ThreadProxy : public Proxy,
|
| scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_;
|
|
|
| scoped_ptr<Scheduler> scheduler_on_impl_thread_;
|
| + bool frame_did_draw_;
|
|
|
| // Set when the main thread is waiting on a
|
| // ScheduledActionSendBeginFrameToMainThread to be issued.
|
| CompletionEvent*
|
| begin_frame_sent_to_main_thread_completion_event_on_impl_thread_;
|
|
|
| + // Set when there is a pending tree on a commit.
|
| + base::Closure deferred_start_commit_on_impl_thread_;
|
| +
|
| // Set when the main thread is waiting on a readback.
|
| ReadbackRequest* readback_request_on_impl_thread_;
|
|
|
|
|