Index: cc/thread_proxy.cc |
diff --git a/cc/thread_proxy.cc b/cc/thread_proxy.cc |
index cd0baa3b6aa6dbc3d892f62a2f039722001599bb..4a437bb1adf79648896ffebcb1084b87012b5a81 100644 |
--- a/cc/thread_proxy.cc |
+++ b/cc/thread_proxy.cc |
@@ -977,4 +977,23 @@ ThreadProxy::BeginFrameAndCommitState::~BeginFrameAndCommitState() |
{ |
} |
+bool ThreadProxy::commitPendingForTesting() |
+{ |
+ DCHECK(isMainThread()); |
+ CommitPendingRequest commitPendingRequest; |
+ { |
+ DebugScopedSetMainThreadBlocked mainThreadBlocked(this); |
+ Proxy::implThread()->postTask(base::Bind(&ThreadProxy::commitPendingOnImplThreadForTesting, base::Unretained(this), &commitPendingRequest)); |
+ commitPendingRequest.completion.wait(); |
+ } |
+ return commitPendingRequest.commitPending; |
+} |
+ |
+void ThreadProxy::commitPendingOnImplThreadForTesting(CommitPendingRequest* request) |
+{ |
+ DCHECK(isImplThread()); |
+ request->commitPending = m_schedulerOnImplThread->commitPending(); |
+ request->completion.signal(); |
+} |
+ |
} // namespace cc |