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

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

Issue 628703005: Remove GpuHostMsg_FrameDrawn and replace with client channel swap ack (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 6 years, 2 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_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
6 #define CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
7 7
8 #include "base/cancelable_callback.h"
8 #include "content/browser/compositor/browser_compositor_output_surface.h" 9 #include "content/browser/compositor/browser_compositor_output_surface.h"
9 10
10 namespace ui { 11 namespace ui {
11 class CompositorVSyncManager; 12 class CompositorVSyncManager;
12 } 13 }
13 14
14 namespace cc { 15 namespace cc {
15 class OverlayCandidateValidator; 16 class OverlayCandidateValidator;
16 } 17 }
17 18
18 namespace content { 19 namespace content {
20 class CommandBufferProxyImpl;
19 21
20 // Adapts a WebGraphicsContext3DCommandBufferImpl into a 22 // Adapts a WebGraphicsContext3DCommandBufferImpl into a
21 // cc::OutputSurface that also handles vsync parameter updates 23 // cc::OutputSurface that also handles vsync parameter updates
22 // arriving from the GPU process. 24 // arriving from the GPU process.
23 class GpuBrowserCompositorOutputSurface 25 class GpuBrowserCompositorOutputSurface
24 : public BrowserCompositorOutputSurface { 26 : public BrowserCompositorOutputSurface {
25 public: 27 public:
26 GpuBrowserCompositorOutputSurface( 28 GpuBrowserCompositorOutputSurface(
27 const scoped_refptr<ContextProviderCommandBuffer>& context, 29 const scoped_refptr<ContextProviderCommandBuffer>& context,
28 int surface_id, 30 int surface_id,
29 IDMap<BrowserCompositorOutputSurface>* output_surface_map, 31 IDMap<BrowserCompositorOutputSurface>* output_surface_map,
30 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, 32 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
31 scoped_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator); 33 scoped_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator);
32 34
33 virtual ~GpuBrowserCompositorOutputSurface(); 35 virtual ~GpuBrowserCompositorOutputSurface();
34 36
35 protected: 37 protected:
36 // cc::OutputSurface implementation. 38 // cc::OutputSurface implementation.
37 virtual void SwapBuffers(cc::CompositorFrame* frame) override; 39 virtual void SwapBuffers(cc::CompositorFrame* frame) override;
40 virtual bool BindToClient(cc::OutputSurfaceClient* client) override;
41
42 CommandBufferProxyImpl* GetCommandBufferProxy();
43 void OnSwapBuffersCompleted(const std::vector<ui::LatencyInfo>& latency_info);
44
45 base::CancelableCallback<void(const std::vector<ui::LatencyInfo>&)>
46 swap_buffers_completion_callback_;
38 47
39 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); 48 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface);
40 }; 49 };
41 50
42 } // namespace content 51 } // namespace content
43 52
44 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 53 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698