| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "cc/output/compositor_frame.h" | 10 #include "cc/output/compositor_frame.h" |
| 11 #include "cc/output/output_surface_client.h" | 11 #include "cc/output/output_surface_client.h" |
| 12 #include "content/browser/compositor/browser_compositor_overlay_candidate_valida
tor.h" | 12 #include "content/browser/compositor/browser_compositor_overlay_candidate_valida
tor.h" |
| 13 #include "content/browser/compositor/reflector_impl.h" | 13 #include "content/browser/compositor/reflector_impl.h" |
| 14 #include "content/browser/compositor/reflector_texture.h" | 14 #include "content/browser/compositor/reflector_texture.h" |
| 15 #include "content/browser/renderer_host/render_widget_host_impl.h" | 15 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 16 #include "content/common/gpu/client/context_provider_command_buffer.h" | 16 #include "content/common/gpu/client/context_provider_command_buffer.h" |
| 17 #include "gpu/command_buffer/client/context_support.h" | 17 #include "gpu/command_buffer/client/context_support.h" |
| 18 | 18 |
| 19 namespace content { | 19 namespace content { |
| 20 | 20 |
| 21 GpuBrowserCompositorOutputSurface::GpuBrowserCompositorOutputSurface( | 21 GpuBrowserCompositorOutputSurface::GpuBrowserCompositorOutputSurface( |
| 22 const scoped_refptr<ContextProviderCommandBuffer>& context, | 22 const scoped_refptr<ContextProviderCommandBuffer>& context, |
| 23 const scoped_refptr<ContextProviderCommandBuffer>& worker_context, | 23 const scoped_refptr<ContextProviderCommandBuffer>& worker_context, |
| 24 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, | 24 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, |
| 25 scoped_ptr<BrowserCompositorOverlayCandidateValidator> | 25 std::unique_ptr<BrowserCompositorOverlayCandidateValidator> |
| 26 overlay_candidate_validator) | 26 overlay_candidate_validator) |
| 27 : BrowserCompositorOutputSurface(context, | 27 : BrowserCompositorOutputSurface(context, |
| 28 worker_context, | 28 worker_context, |
| 29 vsync_manager, | 29 vsync_manager, |
| 30 std::move(overlay_candidate_validator)), | 30 std::move(overlay_candidate_validator)), |
| 31 #if defined(OS_MACOSX) | 31 #if defined(OS_MACOSX) |
| 32 should_show_frames_state_(SHOULD_SHOW_FRAMES), | 32 should_show_frames_state_(SHOULD_SHOW_FRAMES), |
| 33 #endif | 33 #endif |
| 34 swap_buffers_completion_callback_(base::Bind( | 34 swap_buffers_completion_callback_(base::Bind( |
| 35 &GpuBrowserCompositorOutputSurface::OnGpuSwapBuffersCompleted, | 35 &GpuBrowserCompositorOutputSurface::OnGpuSwapBuffersCompleted, |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 154 |
| 155 bool GpuBrowserCompositorOutputSurface::SurfaceIsSuspendForRecycle() const { | 155 bool GpuBrowserCompositorOutputSurface::SurfaceIsSuspendForRecycle() const { |
| 156 #if defined(OS_MACOSX) | 156 #if defined(OS_MACOSX) |
| 157 return should_show_frames_state_ == SHOULD_NOT_SHOW_FRAMES_SUSPENDED; | 157 return should_show_frames_state_ == SHOULD_NOT_SHOW_FRAMES_SUSPENDED; |
| 158 #else | 158 #else |
| 159 return false; | 159 return false; |
| 160 #endif | 160 #endif |
| 161 } | 161 } |
| 162 | 162 |
| 163 } // namespace content | 163 } // namespace content |
| OLD | NEW |