Index: cc/trees/thread_proxy.cc |
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc |
index d5301eea136c1d194acbcabc54b1ba37a2ff4392..731e236c3c80df30681b13042e9e5b64a70cba4e 100644 |
--- a/cc/trees/thread_proxy.cc |
+++ b/cc/trees/thread_proxy.cc |
@@ -40,11 +40,6 @@ unsigned int nextBeginFrameId = 0; |
} // namespace |
-struct ThreadProxy::CommitPendingRequest { |
- CompletionEvent completion; |
- bool commit_pending; |
-}; |
- |
struct ThreadProxy::SchedulerStateRequest { |
CompletionEvent completion; |
scoped_ptr<base::Value> state; |
@@ -1298,29 +1293,33 @@ void ThreadProxy::AsValueOnImplThread(CompletionEvent* completion, |
completion->Signal(); |
} |
-bool ThreadProxy::CommitPendingForTesting() { |
+bool ThreadProxy::MainFrameWillHappenForTesting() { |
DCHECK(IsMainThread()); |
- CommitPendingRequest commit_pending_request; |
+ CompletionEvent completion; |
+ bool main_frame_will_happen = false; |
{ |
DebugScopedSetMainThreadBlocked main_thread_blocked(this); |
Proxy::ImplThreadTaskRunner()->PostTask( |
FROM_HERE, |
- base::Bind(&ThreadProxy::CommitPendingOnImplThreadForTesting, |
+ base::Bind(&ThreadProxy::MainFrameWillHappenOnImplThreadForTesting, |
impl_thread_weak_ptr_, |
- &commit_pending_request)); |
- commit_pending_request.completion.Wait(); |
+ &completion, |
+ &main_frame_will_happen)); |
+ completion.Wait(); |
} |
- return commit_pending_request.commit_pending; |
+ return main_frame_will_happen; |
} |
-void ThreadProxy::CommitPendingOnImplThreadForTesting( |
- CommitPendingRequest* request) { |
+void ThreadProxy::MainFrameWillHappenOnImplThreadForTesting( |
+ CompletionEvent* completion, |
+ bool* main_frame_will_happen) { |
DCHECK(IsImplThread()); |
- if (impl().layer_tree_host_impl->output_surface()) |
- request->commit_pending = impl().scheduler->CommitPending(); |
- else |
- request->commit_pending = false; |
- request->completion.Signal(); |
+ if (impl().layer_tree_host_impl->output_surface()) { |
+ *main_frame_will_happen = impl().scheduler->MainFrameForTestingWillHappen(); |
+ } else { |
+ *main_frame_will_happen = false; |
+ } |
+ completion->Signal(); |
} |
void ThreadProxy::RenewTreePriority() { |