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