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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_COMPOSITOR_GPU_SURFACELESS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
6 #define CONTENT_BROWSER_COMPOSITOR_GPU_SURFACELESS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
8 #include "content/browser/compositor/gpu_browser_compositor_output_surface.h"
12 class BrowserGpuMemoryBufferManager
;
16 class GpuSurfacelessBrowserCompositorOutputSurface
17 : public GpuBrowserCompositorOutputSurface
{
19 GpuSurfacelessBrowserCompositorOutputSurface(
20 const scoped_refptr
<ContextProviderCommandBuffer
>& context
,
22 const scoped_refptr
<ui::CompositorVSyncManager
>& vsync_manager
,
23 scoped_ptr
<BrowserCompositorOverlayCandidateValidator
>
24 overlay_candidate_validator
,
25 unsigned internalformat
,
26 BrowserGpuMemoryBufferManager
* gpu_memory_buffer_manager
);
27 ~GpuSurfacelessBrowserCompositorOutputSurface() override
;
30 // cc::OutputSurface implementation.
31 void SwapBuffers(cc::CompositorFrame
* frame
) override
;
32 void OnSwapBuffersComplete() override
;
33 void BindFramebuffer() override
;
34 void Reshape(const gfx::Size
& size
, float scale_factor
) override
;
36 unsigned int internalformat_
;
37 scoped_ptr
<GLHelper
> gl_helper_
;
38 scoped_ptr
<BufferQueue
> output_surface_
;
39 BrowserGpuMemoryBufferManager
* gpu_memory_buffer_manager_
;
42 } // namespace content
44 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_SURFACELESS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_