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, | |
34 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, | 33 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, |
35 scoped_ptr<BrowserCompositorOverlayCandidateValidator> | 34 scoped_ptr<BrowserCompositorOverlayCandidateValidator> |
36 overlay_candidate_validator) | 35 overlay_candidate_validator) |
37 : BrowserCompositorOutputSurface(context, | 36 : BrowserCompositorOutputSurface(context, |
38 worker_context, | |
39 vsync_manager, | 37 vsync_manager, |
40 overlay_candidate_validator.Pass()), | 38 overlay_candidate_validator.Pass()), |
41 fbo_(0), | 39 fbo_(0), |
42 is_backbuffer_discarded_(false), | 40 is_backbuffer_discarded_(false), |
43 weak_ptr_factory_(this) { | 41 weak_ptr_factory_(this) { |
44 capabilities_.max_frames_pending = 1; | 42 capabilities_.max_frames_pending = 1; |
45 capabilities_.uses_default_gl_framebuffer = false; | 43 capabilities_.uses_default_gl_framebuffer = false; |
46 } | 44 } |
47 | 45 |
48 OffscreenBrowserCompositorOutputSurface:: | 46 OffscreenBrowserCompositorOutputSurface:: |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 #if defined(OS_MACOSX) | 157 #if defined(OS_MACOSX) |
160 | 158 |
161 bool OffscreenBrowserCompositorOutputSurface:: | 159 bool OffscreenBrowserCompositorOutputSurface:: |
162 SurfaceShouldNotShowFramesAfterSuspendForRecycle() const { | 160 SurfaceShouldNotShowFramesAfterSuspendForRecycle() const { |
163 return true; | 161 return true; |
164 } | 162 } |
165 | 163 |
166 #endif | 164 #endif |
167 | 165 |
168 } // namespace content | 166 } // namespace content |
OLD | NEW |