Mac: Don't use a dummy NSView as a gfx::AcceleratedWidget
[chromium-blink-merge.git] / content / browser / compositor / gpu_browser_compositor_output_surface.h
blobdd1ac3f693dc8ba59404652a32aeb0017e570aa6
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_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
6 #define CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
8 #include "content/browser/compositor/browser_compositor_output_surface.h"
10 namespace ui {
11 class CompositorVSyncManager;
14 namespace cc {
15 class OverlayCandidateValidator;
18 namespace content {
20 // Adapts a WebGraphicsContext3DCommandBufferImpl into a
21 // cc::OutputSurface that also handles vsync parameter updates
22 // arriving from the GPU process.
23 class GpuBrowserCompositorOutputSurface
24 : public BrowserCompositorOutputSurface {
25 public:
26 GpuBrowserCompositorOutputSurface(
27 const scoped_refptr<ContextProviderCommandBuffer>& context,
28 int surface_id,
29 IDMap<BrowserCompositorOutputSurface>* output_surface_map,
30 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
31 scoped_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator);
33 virtual ~GpuBrowserCompositorOutputSurface();
35 private:
36 // cc::OutputSurface implementation.
37 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE;
39 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface);
42 } // namespace content
44 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_