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

Side by Side Diff: content/browser/compositor/gpu_process_transport_factory.cc

Issue 433543002: Add a new ozone switch to enable surfaceless output mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo Created 6 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/compositor/gpu_process_transport_factory.h" 5 #include "content/browser/compositor/gpu_process_transport_factory.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 scoped_ptr<SoftwareBrowserCompositorOutputSurface> surface( 218 scoped_ptr<SoftwareBrowserCompositorOutputSurface> surface(
219 new SoftwareBrowserCompositorOutputSurface( 219 new SoftwareBrowserCompositorOutputSurface(
220 output_surface_proxy_, 220 output_surface_proxy_,
221 CreateSoftwareOutputDevice(compositor), 221 CreateSoftwareOutputDevice(compositor),
222 per_compositor_data_[compositor]->surface_id, 222 per_compositor_data_[compositor]->surface_id,
223 &output_surface_map_, 223 &output_surface_map_,
224 compositor->vsync_manager())); 224 compositor->vsync_manager()));
225 return surface.PassAs<cc::OutputSurface>(); 225 return surface.PassAs<cc::OutputSurface>();
226 } 226 }
227 227
228 scoped_ptr<BrowserCompositorOutputSurface> surface( 228 scoped_ptr<BrowserCompositorOutputSurface> surface;
229 new GpuBrowserCompositorOutputSurface( 229 #if defined(USE_OZONE)
230 context_provider, 230 if (ui::SurfaceFactoryOzone::GetInstance()->CanShowPrimaryPlaneAsOverlay()) {
231 per_compositor_data_[compositor]->surface_id, 231 NOTIMPLEMENTED();
232 &output_surface_map_, 232 return scoped_ptr<cc::OutputSurface>(); // TODO(achaulk) implementation.
danakj 2014/08/08 15:41:20 What's the point of adding this in this CL if it c
achaulk 2014/08/08 15:46:03 It was mostly to show where/how it would be used,
danakj 2014/08/08 15:46:48 Ya, I think it would make sense to add it once it
achaulk 2014/08/08 15:49:21 Done.
233 compositor->vsync_manager(), 233 }
234 CreateOverlayCandidateValidator(compositor->widget()))); 234 #endif
235 if (!surface)
danakj 2014/08/08 15:46:48 (btw you'd need {} for this cuz multi-line body.)
236 surface.reset(new GpuBrowserCompositorOutputSurface(
237 context_provider,
238 per_compositor_data_[compositor]->surface_id,
239 &output_surface_map_,
240 compositor->vsync_manager(),
241 CreateOverlayCandidateValidator(compositor->widget())));
242
235 if (data->reflector.get()) 243 if (data->reflector.get())
236 data->reflector->ReattachToOutputSurfaceFromMainThread(surface.get()); 244 data->reflector->ReattachToOutputSurfaceFromMainThread(surface.get());
237 245
238 return surface.PassAs<cc::OutputSurface>(); 246 return surface.PassAs<cc::OutputSurface>();
239 } 247 }
240 248
241 scoped_refptr<ui::Reflector> GpuProcessTransportFactory::CreateReflector( 249 scoped_refptr<ui::Reflector> GpuProcessTransportFactory::CreateReflector(
242 ui::Compositor* source, 250 ui::Compositor* source,
243 ui::Layer* target) { 251 ui::Layer* target) {
244 PerCompositorData* data = per_compositor_data_[source]; 252 PerCompositorData* data = per_compositor_data_[source];
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, 461 FOR_EACH_OBSERVER(ImageTransportFactoryObserver,
454 observer_list_, 462 observer_list_,
455 OnLostResources()); 463 OnLostResources());
456 464
457 // Kill things that use the shared context before killing the shared context. 465 // Kill things that use the shared context before killing the shared context.
458 lost_gl_helper.reset(); 466 lost_gl_helper.reset();
459 lost_shared_main_thread_contexts = NULL; 467 lost_shared_main_thread_contexts = NULL;
460 } 468 }
461 469
462 } // namespace content 470 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/chrome_restart_request.cc ('k') | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698