| 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 #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 "base/cancelable_callback.h" |
| 9 #include "content/browser/compositor/browser_compositor_output_surface.h" | 9 #include "content/browser/compositor/browser_compositor_output_surface.h" |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 class GpuBrowserCompositorOutputSurface | 25 class GpuBrowserCompositorOutputSurface |
| 26 : public BrowserCompositorOutputSurface { | 26 : public BrowserCompositorOutputSurface { |
| 27 public: | 27 public: |
| 28 GpuBrowserCompositorOutputSurface( | 28 GpuBrowserCompositorOutputSurface( |
| 29 const scoped_refptr<ContextProviderCommandBuffer>& context, | 29 const scoped_refptr<ContextProviderCommandBuffer>& context, |
| 30 int surface_id, | 30 int surface_id, |
| 31 IDMap<BrowserCompositorOutputSurface>* output_surface_map, | 31 IDMap<BrowserCompositorOutputSurface>* output_surface_map, |
| 32 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, | 32 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, |
| 33 scoped_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator); | 33 scoped_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator); |
| 34 | 34 |
| 35 virtual ~GpuBrowserCompositorOutputSurface(); | 35 ~GpuBrowserCompositorOutputSurface() override; |
| 36 | 36 |
| 37 protected: | 37 protected: |
| 38 // cc::OutputSurface implementation. | 38 // cc::OutputSurface implementation. |
| 39 virtual void SwapBuffers(cc::CompositorFrame* frame) override; | 39 void SwapBuffers(cc::CompositorFrame* frame) override; |
| 40 virtual bool BindToClient(cc::OutputSurfaceClient* client) override; | 40 bool BindToClient(cc::OutputSurfaceClient* client) override; |
| 41 | 41 |
| 42 #if defined(OS_MACOSX) | 42 #if defined(OS_MACOSX) |
| 43 virtual void OnSurfaceDisplayed() override; | 43 void OnSurfaceDisplayed() override; |
| 44 #endif | 44 #endif |
| 45 | 45 |
| 46 CommandBufferProxyImpl* GetCommandBufferProxy(); | 46 CommandBufferProxyImpl* GetCommandBufferProxy(); |
| 47 void OnSwapBuffersCompleted(const std::vector<ui::LatencyInfo>& latency_info); | 47 void OnSwapBuffersCompleted(const std::vector<ui::LatencyInfo>& latency_info); |
| 48 | 48 |
| 49 base::CancelableCallback<void(const std::vector<ui::LatencyInfo>&)> | 49 base::CancelableCallback<void(const std::vector<ui::LatencyInfo>&)> |
| 50 swap_buffers_completion_callback_; | 50 swap_buffers_completion_callback_; |
| 51 | 51 |
| 52 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); | 52 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 } // namespace content | 55 } // namespace content |
| 56 | 56 |
| 57 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 57 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
| OLD | NEW |