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/reflector_impl.h" | 9 #include "content/browser/compositor/reflector_impl.h" |
10 #include "content/browser/renderer_host/render_widget_host_impl.h" | 10 #include "content/browser/renderer_host/render_widget_host_impl.h" |
11 #include "content/common/gpu/client/context_provider_command_buffer.h" | 11 #include "content/common/gpu/client/context_provider_command_buffer.h" |
12 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
13 #include "gpu/command_buffer/client/context_support.h" | 13 #include "gpu/command_buffer/client/context_support.h" |
14 #include "gpu/command_buffer/client/gles2_interface.h" | 14 #include "gpu/command_buffer/client/gles2_interface.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 int surface_id, | 21 int surface_id, |
21 IDMap<BrowserCompositorOutputSurface>* output_surface_map, | 22 IDMap<BrowserCompositorOutputSurface>* output_surface_map, |
22 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, | 23 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, |
23 scoped_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator) | 24 scoped_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator) |
24 : BrowserCompositorOutputSurface(context, | 25 : BrowserCompositorOutputSurface(context, |
| 26 worker_context, |
25 surface_id, | 27 surface_id, |
26 output_surface_map, | 28 output_surface_map, |
27 vsync_manager), | 29 vsync_manager), |
28 #if defined(OS_MACOSX) | 30 #if defined(OS_MACOSX) |
29 should_not_show_frames_(false), | 31 should_not_show_frames_(false), |
30 #endif | 32 #endif |
31 swap_buffers_completion_callback_( | 33 swap_buffers_completion_callback_( |
32 base::Bind(&GpuBrowserCompositorOutputSurface::OnSwapBuffersCompleted, | 34 base::Bind(&GpuBrowserCompositorOutputSurface::OnSwapBuffersCompleted, |
33 base::Unretained(this))) { | 35 base::Unretained(this))) { |
34 overlay_candidate_validator_ = overlay_candidate_validator.Pass(); | 36 overlay_candidate_validator_ = overlay_candidate_validator.Pass(); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 should_not_show_frames_ = true; | 129 should_not_show_frames_ = true; |
128 } | 130 } |
129 | 131 |
130 bool GpuBrowserCompositorOutputSurface::ShouldNotShowFramesAfterRecycle() | 132 bool GpuBrowserCompositorOutputSurface::ShouldNotShowFramesAfterRecycle() |
131 const { | 133 const { |
132 return should_not_show_frames_; | 134 return should_not_show_frames_; |
133 } | 135 } |
134 #endif | 136 #endif |
135 | 137 |
136 } // namespace content | 138 } // namespace content |
OLD | NEW |