| 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 "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 11 #include "content/browser/compositor/browser_compositor_output_surface.h" | 11 #include "content/browser/compositor/browser_compositor_output_surface.h" |
| 12 #include "ui/gfx/swap_result.h" | 12 #include "ui/gfx/swap_result.h" |
| 13 | 13 |
| 14 namespace gpu { |
| 15 class CommandBufferProxyImpl; |
| 16 } |
| 17 |
| 14 namespace ui { | 18 namespace ui { |
| 15 class CompositorVSyncManager; | 19 class CompositorVSyncManager; |
| 16 } | 20 } |
| 17 | 21 |
| 18 namespace content { | 22 namespace content { |
| 19 class CommandBufferProxyImpl; | |
| 20 class BrowserCompositorOverlayCandidateValidator; | 23 class BrowserCompositorOverlayCandidateValidator; |
| 21 class ReflectorTexture; | 24 class ReflectorTexture; |
| 22 | 25 |
| 23 // Adapts a WebGraphicsContext3DCommandBufferImpl into a | 26 // Adapts a WebGraphicsContext3DCommandBufferImpl into a |
| 24 // cc::OutputSurface that also handles vsync parameter updates | 27 // cc::OutputSurface that also handles vsync parameter updates |
| 25 // arriving from the GPU process. | 28 // arriving from the GPU process. |
| 26 class GpuBrowserCompositorOutputSurface | 29 class GpuBrowserCompositorOutputSurface |
| 27 : public BrowserCompositorOutputSurface { | 30 : public BrowserCompositorOutputSurface { |
| 28 public: | 31 public: |
| 29 GpuBrowserCompositorOutputSurface( | 32 GpuBrowserCompositorOutputSurface( |
| (...skipping 27 matching lines...) Expand all Loading... |
| 57 // process are for the pre-suspend content and should not be displayed. | 60 // process are for the pre-suspend content and should not be displayed. |
| 58 SHOULD_NOT_SHOW_FRAMES_SUSPENDED, | 61 SHOULD_NOT_SHOW_FRAMES_SUSPENDED, |
| 59 // The compositor has been un-suspended, but has not yet issued a swap | 62 // The compositor has been un-suspended, but has not yet issued a swap |
| 60 // since being un-suspended, so any frames that come from the GPU process | 63 // since being un-suspended, so any frames that come from the GPU process |
| 61 // are for pre-suspend content and should not be displayed. | 64 // are for pre-suspend content and should not be displayed. |
| 62 SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED, | 65 SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED, |
| 63 }; | 66 }; |
| 64 ShouldShowFramesState should_show_frames_state_; | 67 ShouldShowFramesState should_show_frames_state_; |
| 65 #endif | 68 #endif |
| 66 | 69 |
| 67 CommandBufferProxyImpl* GetCommandBufferProxy(); | 70 gpu::CommandBufferProxyImpl* GetCommandBufferProxy(); |
| 68 | 71 |
| 69 base::CancelableCallback<void(const std::vector<ui::LatencyInfo>&, | 72 base::CancelableCallback<void(const std::vector<ui::LatencyInfo>&, |
| 70 gfx::SwapResult)> | 73 gfx::SwapResult)> |
| 71 swap_buffers_completion_callback_; | 74 swap_buffers_completion_callback_; |
| 72 base::CancelableCallback<void(base::TimeTicks timebase, | 75 base::CancelableCallback<void(base::TimeTicks timebase, |
| 73 base::TimeDelta interval)> | 76 base::TimeDelta interval)> |
| 74 update_vsync_parameters_callback_; | 77 update_vsync_parameters_callback_; |
| 75 | 78 |
| 76 scoped_ptr<ReflectorTexture> reflector_texture_; | 79 scoped_ptr<ReflectorTexture> reflector_texture_; |
| 77 | 80 |
| 78 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); | 81 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); |
| 79 }; | 82 }; |
| 80 | 83 |
| 81 } // namespace content | 84 } // namespace content |
| 82 | 85 |
| 83 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 86 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
| OLD | NEW |