OLD | NEW |
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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 ui::Compositor* compositor) { | 167 ui::Compositor* compositor) { |
168 #if defined(OS_WIN) | 168 #if defined(OS_WIN) |
169 return scoped_ptr<cc::SoftwareOutputDevice>(new SoftwareOutputDeviceWin( | 169 return scoped_ptr<cc::SoftwareOutputDevice>(new SoftwareOutputDeviceWin( |
170 compositor)); | 170 compositor)); |
171 #elif defined(USE_OZONE) | 171 #elif defined(USE_OZONE) |
172 return scoped_ptr<cc::SoftwareOutputDevice>(new SoftwareOutputDeviceOzone( | 172 return scoped_ptr<cc::SoftwareOutputDevice>(new SoftwareOutputDeviceOzone( |
173 compositor)); | 173 compositor)); |
174 #elif defined(USE_X11) | 174 #elif defined(USE_X11) |
175 return scoped_ptr<cc::SoftwareOutputDevice>(new SoftwareOutputDeviceX11( | 175 return scoped_ptr<cc::SoftwareOutputDevice>(new SoftwareOutputDeviceX11( |
176 compositor)); | 176 compositor)); |
177 #endif | 177 #else |
178 | |
179 NOTREACHED(); | 178 NOTREACHED(); |
180 return scoped_ptr<cc::SoftwareOutputDevice>(); | 179 return scoped_ptr<cc::SoftwareOutputDevice>(); |
| 180 #endif |
181 } | 181 } |
182 | 182 |
183 scoped_ptr<cc::OutputSurface> GpuProcessTransportFactory::CreateOutputSurface( | 183 scoped_ptr<cc::OutputSurface> GpuProcessTransportFactory::CreateOutputSurface( |
184 ui::Compositor* compositor, bool software_fallback) { | 184 ui::Compositor* compositor, bool software_fallback) { |
185 PerCompositorData* data = per_compositor_data_[compositor]; | 185 PerCompositorData* data = per_compositor_data_[compositor]; |
186 if (!data) | 186 if (!data) |
187 data = CreatePerCompositorData(compositor); | 187 data = CreatePerCompositorData(compositor); |
188 | 188 |
189 bool create_software_renderer = software_fallback; | 189 bool create_software_renderer = software_fallback; |
190 #if defined(OS_CHROMEOS) | 190 #if defined(OS_CHROMEOS) |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 observer_list_, | 476 observer_list_, |
477 OnLostResources()); | 477 OnLostResources()); |
478 | 478 |
479 // Kill things that use the shared context before killing the shared context. | 479 // Kill things that use the shared context before killing the shared context. |
480 lost_gl_helper.reset(); | 480 lost_gl_helper.reset(); |
481 lost_offscreen_compositor_contexts = NULL; | 481 lost_offscreen_compositor_contexts = NULL; |
482 lost_shared_main_thread_contexts = NULL; | 482 lost_shared_main_thread_contexts = NULL; |
483 } | 483 } |
484 | 484 |
485 } // namespace content | 485 } // namespace content |
OLD | NEW |