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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 scoped_ptr<cc::OutputSurface> software_surface; | 183 scoped_ptr<cc::OutputSurface> software_surface; |
184 if (!context_provider) { | 184 if (!context_provider) { |
185 software_surface = | 185 software_surface = |
186 make_scoped_ptr(new SoftwareBrowserCompositorOutputSurface( | 186 make_scoped_ptr(new SoftwareBrowserCompositorOutputSurface( |
187 output_surface_proxy_, | 187 output_surface_proxy_, |
188 CreateSoftwareOutputDevice(compositor), | 188 CreateSoftwareOutputDevice(compositor), |
189 per_compositor_data_[compositor]->surface_id, | 189 per_compositor_data_[compositor]->surface_id, |
190 &output_surface_map_, | 190 &output_surface_map_, |
191 compositor->vsync_manager())); | 191 compositor->vsync_manager())); |
192 } | 192 } |
193 scoped_ptr<OnscreenDisplayClient> display_client(new OnscreenDisplayClient( | 193 scoped_ptr<OnscreenDisplayClient> display_client( |
194 context_provider, software_surface.Pass(), manager)); | 194 new OnscreenDisplayClient(context_provider, |
| 195 software_surface.Pass(), |
| 196 manager, |
| 197 compositor->task_runner())); |
195 // TODO(jamesr): Need to set up filtering for the | 198 // TODO(jamesr): Need to set up filtering for the |
196 // GpuHostMsg_UpdateVSyncParameters message. | 199 // GpuHostMsg_UpdateVSyncParameters message. |
197 | 200 |
198 scoped_refptr<cc::ContextProvider> offscreen_context_provider; | 201 scoped_refptr<cc::ContextProvider> offscreen_context_provider; |
199 if (context_provider) { | 202 if (context_provider) { |
200 offscreen_context_provider = ContextProviderCommandBuffer::Create( | 203 offscreen_context_provider = ContextProviderCommandBuffer::Create( |
201 GpuProcessTransportFactory::CreateOffscreenCommandBufferContext(), | 204 GpuProcessTransportFactory::CreateOffscreenCommandBufferContext(), |
202 "Offscreen-Compositor"); | 205 "Offscreen-Compositor"); |
203 } | 206 } |
204 scoped_ptr<SurfaceDisplayOutputSurface> output_surface( | 207 scoped_ptr<SurfaceDisplayOutputSurface> output_surface( |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, | 457 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, |
455 observer_list_, | 458 observer_list_, |
456 OnLostResources()); | 459 OnLostResources()); |
457 | 460 |
458 // Kill things that use the shared context before killing the shared context. | 461 // Kill things that use the shared context before killing the shared context. |
459 lost_gl_helper.reset(); | 462 lost_gl_helper.reset(); |
460 lost_shared_main_thread_contexts = NULL; | 463 lost_shared_main_thread_contexts = NULL; |
461 } | 464 } |
462 | 465 |
463 } // namespace content | 466 } // namespace content |
OLD | NEW |