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

Unified Diff: cc/trees/proxy_impl.h

Issue 2000493002: cc: Fix overwriting of commit completion event in MFBA mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: cc/trees/proxy_impl.h
diff --git a/cc/trees/proxy_impl.h b/cc/trees/proxy_impl.h
index 06930a12274d8a58c4e26f1a7e8b82a9f7dd32ae..f14f42e7700d553d92a3b364e4544caed2b17d09 100644
--- a/cc/trees/proxy_impl.h
+++ b/cc/trees/proxy_impl.h
@@ -48,14 +48,15 @@ class CC_EXPORT ProxyImpl : public NON_EXPORTED_BASE(LayerTreeHostImplClient),
virtual void SetVisibleOnImpl(bool visible);
virtual void ReleaseOutputSurfaceOnImpl(CompletionEvent* completion);
virtual void FinishGLOnImpl(CompletionEvent* completion);
- virtual void MainFrameWillHappenOnImplForTesting(
- CompletionEvent* completion,
- bool* main_frame_will_happen);
virtual void StartCommitOnImpl(CompletionEvent* completion,
LayerTreeHost* layer_tree_host,
base::TimeTicks main_thread_start_time,
bool hold_commit_for_activation);
+ void MainFrameWillHappenOnImplForTesting(CompletionEvent* completion,
+ bool* main_frame_will_happen);
+ void BlockNotifyReadyToActivateForTesting(bool block);
+
protected:
// protected for testing.
ProxyImpl(ChannelImpl* channel_impl,
@@ -130,12 +131,14 @@ class CC_EXPORT ProxyImpl : public NON_EXPORTED_BASE(LayerTreeHostImplClient),
std::unique_ptr<Scheduler> scheduler_;
// Set when the main thread is waiting on a pending tree activation.
- bool next_commit_waits_for_activation_;
+ bool commit_completion_waits_for_activation_;
- // Set when the main thread is waiting on a commit to complete or on a
- // pending tree activation.
+ // Set when the main thread is waiting on a commit to complete.
CompletionEvent* commit_completion_event_;
+ // Set when the main thread is waiting for activation to complete.
+ CompletionEvent* activation_completion_event_;
+
// Set when the next draw should post DidCommitAndDrawFrame to the main
// thread.
bool next_frame_is_newly_committed_frame_;

Powered by Google App Engine
This is Rietveld 408576698