| 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_surfaceless_browser_compositor_output_s
urface.h" | 5 #include "content/browser/compositor/gpu_surfaceless_browser_compositor_output_s
urface.h" |
| 6 | 6 |
| 7 #include "cc/output/compositor_frame.h" | 7 #include "cc/output/compositor_frame.h" |
| 8 #include "content/browser/compositor/buffer_queue.h" | 8 #include "content/browser/compositor/buffer_queue.h" |
| 9 #include "content/browser/compositor/reflector_impl.h" | 9 #include "content/browser/compositor/reflector_impl.h" |
| 10 #include "content/browser/gpu/gpu_surface_tracker.h" | 10 #include "content/browser/gpu/gpu_surface_tracker.h" |
| 11 #include "content/common/gpu/client/context_provider_command_buffer.h" | 11 #include "content/common/gpu/client/context_provider_command_buffer.h" |
| 12 #include "content/common/gpu/client/gl_helper.h" | 12 #include "content/common/gpu/client/gl_helper.h" |
| 13 #include "gpu/GLES2/gl2extchromium.h" | 13 #include "gpu/GLES2/gl2extchromium.h" |
| 14 #include "gpu/command_buffer/client/gles2_interface.h" | 14 #include "gpu/command_buffer/client/gles2_interface.h" |
| 15 | 15 |
| 16 namespace content { | 16 namespace content { |
| 17 | 17 |
| 18 GpuSurfacelessBrowserCompositorOutputSurface:: | 18 GpuSurfacelessBrowserCompositorOutputSurface:: |
| 19 GpuSurfacelessBrowserCompositorOutputSurface( | 19 GpuSurfacelessBrowserCompositorOutputSurface( |
| 20 const scoped_refptr<ContextProviderCommandBuffer>& context, | 20 const scoped_refptr<ContextProviderCommandBuffer>& context, |
| 21 const scoped_refptr<ContextProviderCommandBuffer>& worker_context, |
| 21 int surface_id, | 22 int surface_id, |
| 22 IDMap<BrowserCompositorOutputSurface>* output_surface_map, | 23 IDMap<BrowserCompositorOutputSurface>* output_surface_map, |
| 23 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, | 24 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, |
| 24 scoped_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator, | 25 scoped_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator, |
| 25 unsigned internalformat, | 26 unsigned internalformat, |
| 26 bool use_own_gl_helper, | 27 bool use_own_gl_helper, |
| 27 BrowserGpuMemoryBufferManager* gpu_memory_buffer_manager) | 28 BrowserGpuMemoryBufferManager* gpu_memory_buffer_manager) |
| 28 : GpuBrowserCompositorOutputSurface(context, | 29 : GpuBrowserCompositorOutputSurface(context, |
| 30 worker_context, |
| 29 surface_id, | 31 surface_id, |
| 30 output_surface_map, | 32 output_surface_map, |
| 31 vsync_manager, | 33 vsync_manager, |
| 32 overlay_candidate_validator.Pass()), | 34 overlay_candidate_validator.Pass()), |
| 33 internalformat_(internalformat), | 35 internalformat_(internalformat), |
| 34 use_own_gl_helper_(use_own_gl_helper), | 36 use_own_gl_helper_(use_own_gl_helper), |
| 35 gpu_memory_buffer_manager_(gpu_memory_buffer_manager) { | 37 gpu_memory_buffer_manager_(gpu_memory_buffer_manager) { |
| 36 capabilities_.uses_default_gl_framebuffer = false; | 38 capabilities_.uses_default_gl_framebuffer = false; |
| 37 capabilities_.flipped_output_surface = true; | 39 capabilities_.flipped_output_surface = true; |
| 38 } | 40 } |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 if (!helper) | 99 if (!helper) |
| 98 return false; | 100 return false; |
| 99 | 101 |
| 100 output_surface_.reset(new BufferQueue(context_provider_, internalformat_, | 102 output_surface_.reset(new BufferQueue(context_provider_, internalformat_, |
| 101 helper, gpu_memory_buffer_manager_, | 103 helper, gpu_memory_buffer_manager_, |
| 102 surface_id_)); | 104 surface_id_)); |
| 103 return output_surface_->Initialize(); | 105 return output_surface_->Initialize(); |
| 104 } | 106 } |
| 105 | 107 |
| 106 } // namespace content | 108 } // namespace content |
| OLD | NEW |