Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Side by Side Diff: content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.h

Issue 571623003: Partial swap implementation for surfaceless (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef CONTENT_BROWSER_COMPOSITOR_GPU_SURFACELESS_BROWSER_COMPOSITOR_OUTPUT_SUR FACE_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_GPU_SURFACELESS_BROWSER_COMPOSITOR_OUTPUT_SUR FACE_H_
6 #define CONTENT_BROWSER_COMPOSITOR_GPU_SURFACELESS_BROWSER_COMPOSITOR_OUTPUT_SUR FACE_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_GPU_SURFACELESS_BROWSER_COMPOSITOR_OUTPUT_SUR FACE_H_
7 7
8 #include "content/browser/compositor/gpu_browser_compositor_output_surface.h" 8 #include "content/browser/compositor/gpu_browser_compositor_output_surface.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 class BufferQueue; 12 class BufferQueue;
13 class GLHelper;
13 14
14 class GpuSurfacelessBrowserCompositorOutputSurface 15 class GpuSurfacelessBrowserCompositorOutputSurface
15 : public GpuBrowserCompositorOutputSurface { 16 : public GpuBrowserCompositorOutputSurface {
16 public: 17 public:
17 GpuSurfacelessBrowserCompositorOutputSurface( 18 GpuSurfacelessBrowserCompositorOutputSurface(
18 const scoped_refptr<ContextProviderCommandBuffer>& context, 19 const scoped_refptr<ContextProviderCommandBuffer>& context,
19 int surface_id, 20 int surface_id,
20 IDMap<BrowserCompositorOutputSurface>* output_surface_map, 21 IDMap<BrowserCompositorOutputSurface>* output_surface_map,
21 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, 22 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
22 scoped_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator, 23 scoped_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator,
24 GLHelper* gl_helper,
23 unsigned internalformat); 25 unsigned internalformat);
24 virtual ~GpuSurfacelessBrowserCompositorOutputSurface(); 26 virtual ~GpuSurfacelessBrowserCompositorOutputSurface();
25 27
26 private: 28 private:
27 // cc::OutputSurface implementation. 29 // cc::OutputSurface implementation.
28 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; 30 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE;
29 virtual void OnSwapBuffersComplete() OVERRIDE; 31 virtual void OnSwapBuffersComplete() OVERRIDE;
30 virtual void BindFramebuffer() OVERRIDE; 32 virtual void BindFramebuffer() OVERRIDE;
31 virtual void Reshape(const gfx::Size& size, float scale_factor) OVERRIDE; 33 virtual void Reshape(const gfx::Size& size, float scale_factor) OVERRIDE;
32 virtual bool BindToClient(cc::OutputSurfaceClient* client) OVERRIDE; 34 virtual bool BindToClient(cc::OutputSurfaceClient* client) OVERRIDE;
33 35
34 unsigned int internalformat_; 36 unsigned int internalformat_;
37 GLHelper* gl_helper_;
35 scoped_ptr<BufferQueue> output_surface_; 38 scoped_ptr<BufferQueue> output_surface_;
36 }; 39 };
37 40
38 } // namespace content 41 } // namespace content
39 42
40 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_SURFACELESS_BROWSER_COMPOSITOR_OUTPUT_ SURFACE_H_ 43 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_SURFACELESS_BROWSER_COMPOSITOR_OUTPUT_ SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698