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/compositor/reflector_texture.h" | 11 #include "content/browser/compositor/reflector_texture.h" |
12 #include "content/browser/renderer_host/render_widget_host_impl.h" | 12 #include "content/browser/renderer_host/render_widget_host_impl.h" |
13 #include "content/common/gpu/client/context_provider_command_buffer.h" | 13 #include "content/common/gpu/client/context_provider_command_buffer.h" |
14 #include "gpu/command_buffer/client/context_support.h" | 14 #include "gpu/command_buffer/client/context_support.h" |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 | 17 |
18 GpuBrowserCompositorOutputSurface::GpuBrowserCompositorOutputSurface( | 18 GpuBrowserCompositorOutputSurface::GpuBrowserCompositorOutputSurface( |
19 const scoped_refptr<ContextProviderCommandBuffer>& context, | 19 const scoped_refptr<ContextProviderCommandBuffer>& context, |
| 20 const scoped_refptr<ContextProviderCommandBuffer>& worker_context, |
20 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, | 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 worker_context, |
24 vsync_manager, | 26 vsync_manager, |
25 overlay_candidate_validator.Pass()), | 27 overlay_candidate_validator.Pass()), |
26 #if defined(OS_MACOSX) | 28 #if defined(OS_MACOSX) |
27 should_show_frames_state_(SHOULD_SHOW_FRAMES), | 29 should_show_frames_state_(SHOULD_SHOW_FRAMES), |
28 #endif | 30 #endif |
29 swap_buffers_completion_callback_( | 31 swap_buffers_completion_callback_( |
30 base::Bind(&GpuBrowserCompositorOutputSurface::OnSwapBuffersCompleted, | 32 base::Bind(&GpuBrowserCompositorOutputSurface::OnSwapBuffersCompleted, |
31 base::Unretained(this))), | 33 base::Unretained(this))), |
32 update_vsync_parameters_callback_(base::Bind( | 34 update_vsync_parameters_callback_(base::Bind( |
33 &BrowserCompositorOutputSurface::OnUpdateVSyncParametersFromGpu, | 35 &BrowserCompositorOutputSurface::OnUpdateVSyncParametersFromGpu, |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 157 |
156 bool GpuBrowserCompositorOutputSurface::SurfaceIsSuspendForRecycle() const { | 158 bool GpuBrowserCompositorOutputSurface::SurfaceIsSuspendForRecycle() const { |
157 #if defined(OS_MACOSX) | 159 #if defined(OS_MACOSX) |
158 return should_show_frames_state_ == SHOULD_NOT_SHOW_FRAMES_SUSPENDED; | 160 return should_show_frames_state_ == SHOULD_NOT_SHOW_FRAMES_SUSPENDED; |
159 #else | 161 #else |
160 return false; | 162 return false; |
161 #endif | 163 #endif |
162 } | 164 } |
163 | 165 |
164 } // namespace content | 166 } // namespace content |
OLD | NEW |