| 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 int surface_id, | 21 int surface_id, |
| 22 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, | |
| 23 scoped_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator, | 22 scoped_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator, |
| 24 unsigned internalformat, | 23 unsigned internalformat, |
| 25 BrowserGpuMemoryBufferManager* gpu_memory_buffer_manager) | 24 BrowserGpuMemoryBufferManager* gpu_memory_buffer_manager) |
| 26 : GpuBrowserCompositorOutputSurface(context, | 25 : GpuBrowserCompositorOutputSurface(context, |
| 27 vsync_manager, | |
| 28 overlay_candidate_validator.Pass()), | 26 overlay_candidate_validator.Pass()), |
| 29 internalformat_(internalformat), | 27 internalformat_(internalformat), |
| 30 gpu_memory_buffer_manager_(gpu_memory_buffer_manager) { | 28 gpu_memory_buffer_manager_(gpu_memory_buffer_manager) { |
| 31 capabilities_.uses_default_gl_framebuffer = false; | 29 capabilities_.uses_default_gl_framebuffer = false; |
| 32 capabilities_.flipped_output_surface = true; | 30 capabilities_.flipped_output_surface = true; |
| 33 | 31 |
| 34 gl_helper_.reset(new GLHelper(context_provider_->ContextGL(), | 32 gl_helper_.reset(new GLHelper(context_provider_->ContextGL(), |
| 35 context_provider_->ContextSupport())); | 33 context_provider_->ContextSupport())); |
| 36 output_surface_.reset( | 34 output_surface_.reset( |
| 37 new BufferQueue(context_provider_, internalformat_, gl_helper_.get(), | 35 new BufferQueue(context_provider_, internalformat_, gl_helper_.get(), |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 76 |
| 79 void GpuSurfacelessBrowserCompositorOutputSurface::Reshape( | 77 void GpuSurfacelessBrowserCompositorOutputSurface::Reshape( |
| 80 const gfx::Size& size, | 78 const gfx::Size& size, |
| 81 float scale_factor) { | 79 float scale_factor) { |
| 82 GpuBrowserCompositorOutputSurface::Reshape(size, scale_factor); | 80 GpuBrowserCompositorOutputSurface::Reshape(size, scale_factor); |
| 83 DCHECK(output_surface_); | 81 DCHECK(output_surface_); |
| 84 output_surface_->Reshape(SurfaceSize(), scale_factor); | 82 output_surface_->Reshape(SurfaceSize(), scale_factor); |
| 85 } | 83 } |
| 86 | 84 |
| 87 } // namespace content | 85 } // namespace content |
| OLD | NEW |