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 #include "content/browser/compositor/gpu_browser_compositor_output_surface.h" | 5 #include "content/browser/compositor/gpu_browser_compositor_output_surface.h" |
6 | 6 |
7 #include "cc/output/compositor_frame.h" | 7 #include "cc/output/compositor_frame.h" |
8 #include "cc/output/output_surface_client.h" | 8 #include "cc/output/output_surface_client.h" |
9 #include "content/browser/compositor/browser_compositor_overlay_candidate_valida
tor.h" | 9 #include "content/browser/compositor/browser_compositor_overlay_candidate_valida
tor.h" |
10 #include "content/browser/compositor/reflector_impl.h" | 10 #include "content/browser/compositor/reflector_impl.h" |
11 #include "content/browser/renderer_host/render_widget_host_impl.h" | 11 #include "content/browser/renderer_host/render_widget_host_impl.h" |
12 #include "content/common/gpu/client/context_provider_command_buffer.h" | 12 #include "content/common/gpu/client/context_provider_command_buffer.h" |
13 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
14 #include "gpu/command_buffer/client/context_support.h" | 14 #include "gpu/command_buffer/client/context_support.h" |
15 #include "gpu/command_buffer/client/gles2_interface.h" | 15 #include "gpu/command_buffer/client/gles2_interface.h" |
16 | 16 |
17 namespace content { | 17 namespace content { |
18 | 18 |
19 GpuBrowserCompositorOutputSurface::GpuBrowserCompositorOutputSurface( | 19 GpuBrowserCompositorOutputSurface::GpuBrowserCompositorOutputSurface( |
20 const scoped_refptr<ContextProviderCommandBuffer>& context, | 20 const scoped_refptr<ContextProviderCommandBuffer>& context, |
| 21 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, |
21 scoped_ptr<BrowserCompositorOverlayCandidateValidator> | 22 scoped_ptr<BrowserCompositorOverlayCandidateValidator> |
22 overlay_candidate_validator) | 23 overlay_candidate_validator) |
23 : BrowserCompositorOutputSurface(context, | 24 : BrowserCompositorOutputSurface(context, |
| 25 vsync_manager, |
24 overlay_candidate_validator.Pass()), | 26 overlay_candidate_validator.Pass()), |
25 #if defined(OS_MACOSX) | 27 #if defined(OS_MACOSX) |
26 should_show_frames_state_(SHOULD_SHOW_FRAMES), | 28 should_show_frames_state_(SHOULD_SHOW_FRAMES), |
27 #endif | 29 #endif |
28 swap_buffers_completion_callback_( | 30 swap_buffers_completion_callback_( |
29 base::Bind(&GpuBrowserCompositorOutputSurface::OnSwapBuffersCompleted, | 31 base::Bind(&GpuBrowserCompositorOutputSurface::OnSwapBuffersCompleted, |
30 base::Unretained(this))), | 32 base::Unretained(this))), |
31 update_vsync_parameters_callback_(base::Bind( | 33 update_vsync_parameters_callback_(base::Bind( |
32 &BrowserCompositorOutputSurface::OnUpdateVSyncParametersFromGpu, | 34 &BrowserCompositorOutputSurface::OnUpdateVSyncParametersFromGpu, |
33 base::Unretained(this))) { | 35 base::Unretained(this))) { |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 } | 141 } |
140 } | 142 } |
141 | 143 |
142 bool GpuBrowserCompositorOutputSurface:: | 144 bool GpuBrowserCompositorOutputSurface:: |
143 SurfaceShouldNotShowFramesAfterSuspendForRecycle() const { | 145 SurfaceShouldNotShowFramesAfterSuspendForRecycle() const { |
144 return should_show_frames_state_ != SHOULD_SHOW_FRAMES; | 146 return should_show_frames_state_ != SHOULD_SHOW_FRAMES; |
145 } | 147 } |
146 #endif | 148 #endif |
147 | 149 |
148 } // namespace content | 150 } // namespace content |
OLD | NEW |