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

Unified Diff: cc/thread_proxy.cc

Issue 11478039: cc: Force layer tree tests to go idle before exiting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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
« no previous file with comments | « cc/thread_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « cc/thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698