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

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

Issue 312393002: ozone: Move the factory interfaces into a common target. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-r278697 Created 6 years, 6 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
« no previous file with comments | « content/DEPS ('k') | content/browser/compositor/overlay_candidate_validator_ozone.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 30 matching lines...) Expand all
41 #include "ui/compositor/compositor_constants.h" 41 #include "ui/compositor/compositor_constants.h"
42 #include "ui/compositor/compositor_switches.h" 42 #include "ui/compositor/compositor_switches.h"
43 #include "ui/gfx/native_widget_types.h" 43 #include "ui/gfx/native_widget_types.h"
44 #include "ui/gfx/size.h" 44 #include "ui/gfx/size.h"
45 45
46 #if defined(OS_WIN) 46 #if defined(OS_WIN)
47 #include "content/browser/compositor/software_output_device_win.h" 47 #include "content/browser/compositor/software_output_device_win.h"
48 #elif defined(USE_OZONE) 48 #elif defined(USE_OZONE)
49 #include "content/browser/compositor/overlay_candidate_validator_ozone.h" 49 #include "content/browser/compositor/overlay_candidate_validator_ozone.h"
50 #include "content/browser/compositor/software_output_device_ozone.h" 50 #include "content/browser/compositor/software_output_device_ozone.h"
51 #include "ui/gfx/ozone/surface_factory_ozone.h" 51 #include "ui/ozone/public/surface_factory_ozone.h"
52 #elif defined(USE_X11) 52 #elif defined(USE_X11)
53 #include "content/browser/compositor/software_output_device_x11.h" 53 #include "content/browser/compositor/software_output_device_x11.h"
54 #elif defined(OS_MACOSX) 54 #elif defined(OS_MACOSX)
55 #include "content/browser/compositor/software_output_device_mac.h" 55 #include "content/browser/compositor/software_output_device_mac.h"
56 #endif 56 #endif
57 57
58 using cc::ContextProvider; 58 using cc::ContextProvider;
59 using gpu::gles2::GLES2Interface; 59 using gpu::gles2::GLES2Interface;
60 60
61 namespace content { 61 namespace content {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 new SoftwareOutputDeviceMac(compositor)); 114 new SoftwareOutputDeviceMac(compositor));
115 #else 115 #else
116 NOTREACHED(); 116 NOTREACHED();
117 return scoped_ptr<cc::SoftwareOutputDevice>(); 117 return scoped_ptr<cc::SoftwareOutputDevice>();
118 #endif 118 #endif
119 } 119 }
120 120
121 scoped_ptr<cc::OverlayCandidateValidator> CreateOverlayCandidateValidator( 121 scoped_ptr<cc::OverlayCandidateValidator> CreateOverlayCandidateValidator(
122 gfx::AcceleratedWidget widget) { 122 gfx::AcceleratedWidget widget) {
123 #if defined(USE_OZONE) 123 #if defined(USE_OZONE)
124 gfx::OverlayCandidatesOzone* overlay_candidates = 124 ui::OverlayCandidatesOzone* overlay_candidates =
125 gfx::SurfaceFactoryOzone::GetInstance()->GetOverlayCandidates(widget); 125 ui::SurfaceFactoryOzone::GetInstance()->GetOverlayCandidates(widget);
126 if (overlay_candidates && CommandLine::ForCurrentProcess()->HasSwitch( 126 if (overlay_candidates && CommandLine::ForCurrentProcess()->HasSwitch(
127 switches::kEnableHardwareOverlays)) { 127 switches::kEnableHardwareOverlays)) {
128 return scoped_ptr<cc::OverlayCandidateValidator>( 128 return scoped_ptr<cc::OverlayCandidateValidator>(
129 new OverlayCandidateValidatorOzone(widget, overlay_candidates)); 129 new OverlayCandidateValidatorOzone(widget, overlay_candidates));
130 } 130 }
131 #endif 131 #endif
132 return scoped_ptr<cc::OverlayCandidateValidator>(); 132 return scoped_ptr<cc::OverlayCandidateValidator>();
133 } 133 }
134 134
135 scoped_ptr<cc::OutputSurface> GpuProcessTransportFactory::CreateOutputSurface( 135 scoped_ptr<cc::OutputSurface> GpuProcessTransportFactory::CreateOutputSurface(
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, 438 FOR_EACH_OBSERVER(ImageTransportFactoryObserver,
439 observer_list_, 439 observer_list_,
440 OnLostResources()); 440 OnLostResources());
441 441
442 // Kill things that use the shared context before killing the shared context. 442 // Kill things that use the shared context before killing the shared context.
443 lost_gl_helper.reset(); 443 lost_gl_helper.reset();
444 lost_shared_main_thread_contexts = NULL; 444 lost_shared_main_thread_contexts = NULL;
445 } 445 }
446 446
447 } // namespace content 447 } // namespace content
OLDNEW
« no previous file with comments | « content/DEPS ('k') | content/browser/compositor/overlay_candidate_validator_ozone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698