OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/offscreen_browser_compositor_output_surface
.h" | 5 #include "content/browser/compositor/offscreen_browser_compositor_output_surface
.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "cc/output/compositor_frame.h" | 8 #include "cc/output/compositor_frame.h" |
9 #include "cc/output/compositor_frame_ack.h" | 9 #include "cc/output/compositor_frame_ack.h" |
10 #include "cc/output/gl_frame_data.h" | 10 #include "cc/output/gl_frame_data.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 using cc::CompositorFrame; | 23 using cc::CompositorFrame; |
24 using cc::GLFrameData; | 24 using cc::GLFrameData; |
25 using cc::ResourceProvider; | 25 using cc::ResourceProvider; |
26 using gpu::gles2::GLES2Interface; | 26 using gpu::gles2::GLES2Interface; |
27 | 27 |
28 namespace content { | 28 namespace content { |
29 | 29 |
30 OffscreenBrowserCompositorOutputSurface:: | 30 OffscreenBrowserCompositorOutputSurface:: |
31 OffscreenBrowserCompositorOutputSurface( | 31 OffscreenBrowserCompositorOutputSurface( |
32 const scoped_refptr<ContextProviderCommandBuffer>& context, | 32 const scoped_refptr<ContextProviderCommandBuffer>& context, |
| 33 const scoped_refptr<ContextProviderCommandBuffer>& worker_context, |
33 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, | 34 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, |
34 scoped_ptr<BrowserCompositorOverlayCandidateValidator> | 35 scoped_ptr<BrowserCompositorOverlayCandidateValidator> |
35 overlay_candidate_validator) | 36 overlay_candidate_validator) |
36 : BrowserCompositorOutputSurface(context, | 37 : BrowserCompositorOutputSurface(context, |
| 38 worker_context, |
37 vsync_manager, | 39 vsync_manager, |
38 overlay_candidate_validator.Pass()), | 40 overlay_candidate_validator.Pass()), |
39 fbo_(0), | 41 fbo_(0), |
40 is_backbuffer_discarded_(false), | 42 is_backbuffer_discarded_(false), |
41 weak_ptr_factory_(this) { | 43 weak_ptr_factory_(this) { |
42 capabilities_.max_frames_pending = 1; | 44 capabilities_.max_frames_pending = 1; |
43 capabilities_.uses_default_gl_framebuffer = false; | 45 capabilities_.uses_default_gl_framebuffer = false; |
44 } | 46 } |
45 | 47 |
46 OffscreenBrowserCompositorOutputSurface:: | 48 OffscreenBrowserCompositorOutputSurface:: |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 #if defined(OS_MACOSX) | 159 #if defined(OS_MACOSX) |
158 | 160 |
159 bool OffscreenBrowserCompositorOutputSurface:: | 161 bool OffscreenBrowserCompositorOutputSurface:: |
160 SurfaceShouldNotShowFramesAfterSuspendForRecycle() const { | 162 SurfaceShouldNotShowFramesAfterSuspendForRecycle() const { |
161 return true; | 163 return true; |
162 } | 164 } |
163 | 165 |
164 #endif | 166 #endif |
165 | 167 |
166 } // namespace content | 168 } // namespace content |
OLD | NEW |