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

Unified Diff: cc/trees/thread_proxy.h

Issue 19106007: cc: Allow the main thread to cancel commits (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 7 years, 5 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/thread_proxy.h
diff --git a/cc/trees/thread_proxy.h b/cc/trees/thread_proxy.h
index deef5baa45b0d7f53bccce7e5c9f0f180cac3094..f6293bde140e67a4fb1728e28bf78a4adbed0d80 100644
--- a/cc/trees/thread_proxy.h
+++ b/cc/trees/thread_proxy.h
@@ -49,6 +49,7 @@ class ThreadProxy : public Proxy,
virtual void CreateAndInitializeOutputSurface() OVERRIDE;
virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE;
virtual void SetNeedsAnimate() OVERRIDE;
+ virtual void SetNeedsUpdateLayers() OVERRIDE;
virtual void SetNeedsCommit() OVERRIDE;
virtual void SetNeedsRedraw(gfx::Rect damage_rect) OVERRIDE;
virtual void SetDeferCommits(bool defer_commits) OVERRIDE;
@@ -136,6 +137,7 @@ class ThreadProxy : public Proxy,
void OnOutputSurfaceInitializeAttempted(
bool success,
const RendererCapabilities& capabilities);
+ void SendCommitRequestToImplThreadIfNeeded();
// Called on impl thread.
struct ReadbackRequest;
@@ -147,7 +149,7 @@ class ThreadProxy : public Proxy,
CompletionEvent* completion,
ResourceUpdateQueue* queue,
scoped_refptr<cc::ContextProvider> offscreen_context_provider);
- void BeginFrameAbortedByMainThreadOnImplThread();
+ void BeginFrameAbortedByMainThreadOnImplThread(bool cancel_commit);
void RequestReadbackOnImplThread(ReadbackRequest* request);
void FinishAllRenderingOnImplThread(CompletionEvent* completion);
void InitializeImplOnImplThread(CompletionEvent* completion);
@@ -244,6 +246,8 @@ class ThreadProxy : public Proxy,
bool inside_draw_;
+ bool can_cancel_commit_;
+
bool defer_commits_;
scoped_ptr<BeginFrameAndCommitState> pending_deferred_commit_;

Powered by Google App Engine
This is Rietveld 408576698