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

Side by Side Diff: cc/trees/thread_proxy.cc

Issue 1287043002: cc: Setup API to release OutputSurface from LTHClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unit test 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 unified diff | Download patch
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/trees/thread_proxy.h" 5 #include "cc/trees/thread_proxy.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 layer_tree_host()->RequestNewOutputSurface(); 212 layer_tree_host()->RequestNewOutputSurface();
213 } 213 }
214 214
215 void ThreadProxy::SetOutputSurface(scoped_ptr<OutputSurface> output_surface) { 215 void ThreadProxy::SetOutputSurface(scoped_ptr<OutputSurface> output_surface) {
216 Proxy::ImplThreadTaskRunner()->PostTask( 216 Proxy::ImplThreadTaskRunner()->PostTask(
217 FROM_HERE, 217 FROM_HERE,
218 base::Bind(&ThreadProxy::InitializeOutputSurfaceOnImplThread, 218 base::Bind(&ThreadProxy::InitializeOutputSurfaceOnImplThread,
219 impl_thread_weak_ptr_, base::Passed(&output_surface))); 219 impl_thread_weak_ptr_, base::Passed(&output_surface)));
220 } 220 }
221 221
222 scoped_ptr<OutputSurface> ThreadProxy::GetOutputSurface() {
no sievers 2015/09/10 00:00:22 impl().scheduler->DidLoseOutputSurface();
no sievers 2015/09/10 01:26:24 You'll have to post this to the impl thread and th
sohanjg 2015/09/10 15:07:23 You mean both DidLoseOutputSurface, and Get/Releas
223 return impl().layer_tree_host_impl->GetOutputSurface();
224 }
225
222 void ThreadProxy::DidInitializeOutputSurface( 226 void ThreadProxy::DidInitializeOutputSurface(
223 bool success, 227 bool success,
224 const RendererCapabilities& capabilities) { 228 const RendererCapabilities& capabilities) {
225 TRACE_EVENT0("cc", "ThreadProxy::DidInitializeOutputSurface"); 229 TRACE_EVENT0("cc", "ThreadProxy::DidInitializeOutputSurface");
226 DCHECK(IsMainThread()); 230 DCHECK(IsMainThread());
227 231
228 if (!success) { 232 if (!success) {
229 layer_tree_host()->DidFailToInitializeOutputSurface(); 233 layer_tree_host()->DidFailToInitializeOutputSurface();
230 return; 234 return;
231 } 235 }
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after
1276 1280
1277 void ThreadProxy::PostFrameTimingEvents( 1281 void ThreadProxy::PostFrameTimingEvents(
1278 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, 1282 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
1279 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) { 1283 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
1280 DCHECK(IsMainThread()); 1284 DCHECK(IsMainThread());
1281 layer_tree_host()->RecordFrameTimingEvents(composite_events.Pass(), 1285 layer_tree_host()->RecordFrameTimingEvents(composite_events.Pass(),
1282 main_frame_events.Pass()); 1286 main_frame_events.Pass());
1283 } 1287 }
1284 1288
1285 } // namespace cc 1289 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698