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

Side by Side Diff: cc/thread_proxy.cc

Issue 11782026: ThreadedTest that a non-null OutputSurface that fails initialization immediately doesn't crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch ThreadProxy::commitPendingOnImplThreadForTesting to check for a live output surface Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/thread_proxy.h" 5 #include "cc/thread_proxy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/delay_based_time_source.h" 9 #include "cc/delay_based_time_source.h"
10 #include "cc/draw_quad.h" 10 #include "cc/draw_quad.h"
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 DebugScopedSetMainThreadBlocked mainThreadBlocked(this); 1005 DebugScopedSetMainThreadBlocked mainThreadBlocked(this);
1006 Proxy::implThread()->postTask(base::Bind(&ThreadProxy::commitPendingOnIm plThreadForTesting, m_implThreadWeakPtr, &commitPendingRequest)); 1006 Proxy::implThread()->postTask(base::Bind(&ThreadProxy::commitPendingOnIm plThreadForTesting, m_implThreadWeakPtr, &commitPendingRequest));
1007 commitPendingRequest.completion.wait(); 1007 commitPendingRequest.completion.wait();
1008 } 1008 }
1009 return commitPendingRequest.commitPending; 1009 return commitPendingRequest.commitPending;
1010 } 1010 }
1011 1011
1012 void ThreadProxy::commitPendingOnImplThreadForTesting(CommitPendingRequest* requ est) 1012 void ThreadProxy::commitPendingOnImplThreadForTesting(CommitPendingRequest* requ est)
1013 { 1013 {
1014 DCHECK(isImplThread()); 1014 DCHECK(isImplThread());
1015 request->commitPending = m_schedulerOnImplThread->commitPending(); 1015 if (m_layerTreeHostImpl->outputSurface())
danakj 2013/01/08 01:06:50 Ya, I was thinking about something like this also.
1016 request->commitPending = m_schedulerOnImplThread->commitPending();
1016 request->completion.signal(); 1017 request->completion.signal();
1017 } 1018 }
1018 1019
1019 } // namespace cc 1020 } // namespace cc
OLDNEW
« cc/layer_tree_host_unittest_context.cc ('K') | « cc/layer_tree_host_unittest_context.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698