OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/aura/gpu_process_transport_factory.h" | 5 #include "content/browser/aura/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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 // Make sure the lost context callback doesn't try to run during destruction. | 192 // Make sure the lost context callback doesn't try to run during destruction. |
193 callback_factory_.InvalidateWeakPtrs(); | 193 callback_factory_.InvalidateWeakPtrs(); |
194 } | 194 } |
195 | 195 |
196 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> | 196 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> |
197 GpuProcessTransportFactory::CreateOffscreenCommandBufferContext() { | 197 GpuProcessTransportFactory::CreateOffscreenCommandBufferContext() { |
198 base::WeakPtr<WebGraphicsContext3DSwapBuffersClient> swap_client; | 198 base::WeakPtr<WebGraphicsContext3DSwapBuffersClient> swap_client; |
199 return CreateContextCommon(swap_client, 0); | 199 return CreateContextCommon(swap_client, 0); |
200 } | 200 } |
201 | 201 |
202 scoped_ptr<WebKit::WebGraphicsContext3D> | |
203 GpuProcessTransportFactory::CreateOffscreenContext() { | |
204 return CreateOffscreenCommandBufferContext() | |
205 .PassAs<WebKit::WebGraphicsContext3D>(); | |
206 } | |
207 | |
208 scoped_ptr<cc::SoftwareOutputDevice> CreateSoftwareOutputDevice( | 202 scoped_ptr<cc::SoftwareOutputDevice> CreateSoftwareOutputDevice( |
209 ui::Compositor* compositor) { | 203 ui::Compositor* compositor) { |
210 #if defined(OS_WIN) | 204 #if defined(OS_WIN) |
211 return scoped_ptr<cc::SoftwareOutputDevice>(new SoftwareOutputDeviceWin( | 205 return scoped_ptr<cc::SoftwareOutputDevice>(new SoftwareOutputDeviceWin( |
212 compositor)); | 206 compositor)); |
213 #elif defined(USE_X11) | 207 #elif defined(USE_X11) |
214 return scoped_ptr<cc::SoftwareOutputDevice>(new SoftwareOutputDeviceX11( | 208 return scoped_ptr<cc::SoftwareOutputDevice>(new SoftwareOutputDeviceX11( |
215 compositor)); | 209 compositor)); |
216 #endif | 210 #endif |
217 | 211 |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 shared_contexts_main_thread_ = NULL; | 502 shared_contexts_main_thread_ = NULL; |
509 | 503 |
510 scoped_ptr<GLHelper> old_helper(gl_helper_.release()); | 504 scoped_ptr<GLHelper> old_helper(gl_helper_.release()); |
511 | 505 |
512 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, | 506 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, |
513 observer_list_, | 507 observer_list_, |
514 OnLostResources()); | 508 OnLostResources()); |
515 } | 509 } |
516 | 510 |
517 } // namespace content | 511 } // namespace content |
OLD | NEW |