| Index: cc/trees/thread_proxy.cc
|
| diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
|
| index a379d0e939d2835189cd1527889063952e0531b4..58927a76113fea8abc3230f1e5eb1ad4f9835bcb 100644
|
| --- a/cc/trees/thread_proxy.cc
|
| +++ b/cc/trees/thread_proxy.cc
|
| @@ -52,11 +52,6 @@ class SwapPromiseChecker {
|
|
|
| } // namespace
|
|
|
| -struct ThreadProxy::CommitPendingRequest {
|
| - CompletionEvent completion;
|
| - bool commit_pending;
|
| -};
|
| -
|
| struct ThreadProxy::SchedulerStateRequest {
|
| CompletionEvent completion;
|
| scoped_ptr<base::Value> state;
|
| @@ -1309,29 +1304,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() {
|
|
|