| 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_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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "content/browser/compositor/gpu_browser_compositor_output_surface.h" | 10 #include "content/browser/compositor/gpu_browser_compositor_output_surface.h" |
| 11 | 11 |
| 12 namespace gpu { | 12 namespace gpu { |
| 13 class GpuMemoryBufferManager; | 13 class GpuMemoryBufferManager; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace display_compositor { | |
| 17 class BufferQueue; | |
| 18 class GLHelper; | |
| 19 } | |
| 20 | |
| 21 namespace content { | 16 namespace content { |
| 22 | 17 |
| 18 class BufferQueue; |
| 19 class GLHelper; |
| 20 |
| 23 class GpuSurfacelessBrowserCompositorOutputSurface | 21 class GpuSurfacelessBrowserCompositorOutputSurface |
| 24 : public GpuBrowserCompositorOutputSurface { | 22 : public GpuBrowserCompositorOutputSurface { |
| 25 public: | 23 public: |
| 26 GpuSurfacelessBrowserCompositorOutputSurface( | 24 GpuSurfacelessBrowserCompositorOutputSurface( |
| 27 const scoped_refptr<ContextProviderCommandBuffer>& context, | 25 const scoped_refptr<ContextProviderCommandBuffer>& context, |
| 28 const scoped_refptr<ContextProviderCommandBuffer>& worker_context, | 26 const scoped_refptr<ContextProviderCommandBuffer>& worker_context, |
| 29 int surface_id, | 27 int surface_id, |
| 30 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, | 28 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, |
| 31 base::SingleThreadTaskRunner* task_runner, | 29 base::SingleThreadTaskRunner* task_runner, |
| 32 std::unique_ptr<BrowserCompositorOverlayCandidateValidator> | 30 std::unique_ptr<BrowserCompositorOverlayCandidateValidator> |
| (...skipping 11 matching lines...) Expand all Loading... |
| 44 void Reshape(const gfx::Size& size, float scale_factor, bool alpha) override; | 42 void Reshape(const gfx::Size& size, float scale_factor, bool alpha) override; |
| 45 bool IsDisplayedAsOverlayPlane() const override; | 43 bool IsDisplayedAsOverlayPlane() const override; |
| 46 unsigned GetOverlayTextureId() const override; | 44 unsigned GetOverlayTextureId() const override; |
| 47 | 45 |
| 48 // BrowserCompositorOutputSurface implementation. | 46 // BrowserCompositorOutputSurface implementation. |
| 49 void OnGpuSwapBuffersCompleted( | 47 void OnGpuSwapBuffersCompleted( |
| 50 const std::vector<ui::LatencyInfo>& latency_info, | 48 const std::vector<ui::LatencyInfo>& latency_info, |
| 51 gfx::SwapResult result) override; | 49 gfx::SwapResult result) override; |
| 52 | 50 |
| 53 unsigned int internalformat_; | 51 unsigned int internalformat_; |
| 54 std::unique_ptr<display_compositor::GLHelper> gl_helper_; | 52 std::unique_ptr<GLHelper> gl_helper_; |
| 55 std::unique_ptr<display_compositor::BufferQueue> output_surface_; | 53 std::unique_ptr<BufferQueue> output_surface_; |
| 56 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; | 54 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; |
| 57 }; | 55 }; |
| 58 | 56 |
| 59 } // namespace content | 57 } // namespace content |
| 60 | 58 |
| 61 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_SURFACELESS_BROWSER_COMPOSITOR_OUTPUT_
SURFACE_H_ | 59 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_SURFACELESS_BROWSER_COMPOSITOR_OUTPUT_
SURFACE_H_ |
| OLD | NEW |