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

Unified Diff: cc/trees/thread_proxy.cc

Issue 1352763003: cc: Address comments for https://codereview.chromium.org/1287043002/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sohan
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/single_thread_proxy.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index 67fef2e01a9906b407e6eeae196e0c76ac27d48d..ae543a3e207deae1015580ce5e0d09d84f6aed96 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -219,6 +219,8 @@ void ThreadProxy::SetOutputSurface(scoped_ptr<OutputSurface> output_surface) {
scoped_ptr<OutputSurface> ThreadProxy::ReleaseOutputSurface() {
DCHECK(IsMainThread());
+ DCHECK(layer_tree_host()->output_surface_lost());
+
DebugScopedSetMainThreadBlocked main_thread_blocked(this);
CompletionEvent completion;
scoped_ptr<OutputSurface> output_surface;
@@ -227,7 +229,7 @@ scoped_ptr<OutputSurface> ThreadProxy::ReleaseOutputSurface() {
base::Bind(&ThreadProxy::ReleaseOutputSurfaceOnImplThread,
impl_thread_weak_ptr_, &completion, &output_surface));
completion.Wait();
- return output_surface.Pass();
+ return output_surface;
}
void ThreadProxy::DidInitializeOutputSurface(
@@ -1083,9 +1085,10 @@ void ThreadProxy::InitializeOutputSurfaceOnImplThread(
void ThreadProxy::ReleaseOutputSurfaceOnImplThread(
CompletionEvent* completion,
scoped_ptr<OutputSurface>* output_surface) {
- TRACE_EVENT0("cc", "ThreadProxy::ReleaseOutputSurfaceOnImplThread");
DCHECK(IsImplThread());
+ // Unlike DidLoseOutputSurfaceOnImplThread, we don't need to call
+ // LayerTreeHost::DidLoseOutputSurface since it already knows.
impl().scheduler->DidLoseOutputSurface();
*output_surface = impl().layer_tree_host_impl->ReleaseOutputSurface();
completion->Signal();
« no previous file with comments | « cc/trees/single_thread_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698