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 #include "ui/gfx/swap_result.h" | |
11 | 10 |
12 namespace ui { | 11 namespace ui { |
13 class CompositorVSyncManager; | 12 class CompositorVSyncManager; |
14 } | 13 } |
15 | 14 |
16 namespace content { | 15 namespace content { |
17 class CommandBufferProxyImpl; | 16 class CommandBufferProxyImpl; |
18 class BrowserCompositorOverlayCandidateValidator; | 17 class BrowserCompositorOverlayCandidateValidator; |
19 class ReflectorTexture; | 18 class ReflectorTexture; |
20 | 19 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 SHOULD_NOT_SHOW_FRAMES_SUSPENDED, | 51 SHOULD_NOT_SHOW_FRAMES_SUSPENDED, |
53 // The compositor has been un-suspended, but has not yet issued a swap | 52 // The compositor has been un-suspended, but has not yet issued a swap |
54 // since being un-suspended, so any frames that come from the GPU process | 53 // since being un-suspended, so any frames that come from the GPU process |
55 // are for pre-suspend content and should not be displayed. | 54 // are for pre-suspend content and should not be displayed. |
56 SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED, | 55 SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED, |
57 }; | 56 }; |
58 ShouldShowFramesState should_show_frames_state_; | 57 ShouldShowFramesState should_show_frames_state_; |
59 #endif | 58 #endif |
60 | 59 |
61 CommandBufferProxyImpl* GetCommandBufferProxy(); | 60 CommandBufferProxyImpl* GetCommandBufferProxy(); |
62 void OnSwapBuffersCompleted(const std::vector<ui::LatencyInfo>& latency_info, | 61 void OnSwapBuffersCompleted(const std::vector<ui::LatencyInfo>& latency_info); |
63 gfx::SwapResult result); | |
64 | 62 |
65 base::CancelableCallback<void(const std::vector<ui::LatencyInfo>&, | 63 base::CancelableCallback<void(const std::vector<ui::LatencyInfo>&)> |
66 gfx::SwapResult)> | |
67 swap_buffers_completion_callback_; | 64 swap_buffers_completion_callback_; |
68 base::CancelableCallback<void(base::TimeTicks timebase, | 65 base::CancelableCallback<void(base::TimeTicks timebase, |
69 base::TimeDelta interval)> | 66 base::TimeDelta interval)> |
70 update_vsync_parameters_callback_; | 67 update_vsync_parameters_callback_; |
71 | 68 |
72 scoped_ptr<ReflectorTexture> reflector_texture_; | 69 scoped_ptr<ReflectorTexture> reflector_texture_; |
73 | 70 |
74 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); | 71 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); |
75 }; | 72 }; |
76 | 73 |
77 } // namespace content | 74 } // namespace content |
78 | 75 |
79 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 76 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
OLD | NEW |