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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 using cc::ResourceProvider; | 28 using cc::ResourceProvider; |
29 using gpu::gles2::GLES2Interface; | 29 using gpu::gles2::GLES2Interface; |
30 | 30 |
31 namespace content { | 31 namespace content { |
32 | 32 |
33 OffscreenBrowserCompositorOutputSurface:: | 33 OffscreenBrowserCompositorOutputSurface:: |
34 OffscreenBrowserCompositorOutputSurface( | 34 OffscreenBrowserCompositorOutputSurface( |
35 const scoped_refptr<ContextProviderCommandBuffer>& context, | 35 const scoped_refptr<ContextProviderCommandBuffer>& context, |
36 const scoped_refptr<ContextProviderCommandBuffer>& worker_context, | 36 const scoped_refptr<ContextProviderCommandBuffer>& worker_context, |
37 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, | 37 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, |
| 38 base::SingleThreadTaskRunner* task_runner, |
38 std::unique_ptr<BrowserCompositorOverlayCandidateValidator> | 39 std::unique_ptr<BrowserCompositorOverlayCandidateValidator> |
39 overlay_candidate_validator) | 40 overlay_candidate_validator) |
40 : BrowserCompositorOutputSurface(context, | 41 : BrowserCompositorOutputSurface(context, |
41 worker_context, | 42 worker_context, |
42 vsync_manager, | 43 vsync_manager, |
| 44 task_runner, |
43 std::move(overlay_candidate_validator)), | 45 std::move(overlay_candidate_validator)), |
44 fbo_(0), | 46 fbo_(0), |
45 is_backbuffer_discarded_(false), | 47 is_backbuffer_discarded_(false), |
46 weak_ptr_factory_(this) { | 48 weak_ptr_factory_(this) { |
47 capabilities_.uses_default_gl_framebuffer = false; | 49 capabilities_.uses_default_gl_framebuffer = false; |
48 } | 50 } |
49 | 51 |
50 OffscreenBrowserCompositorOutputSurface:: | 52 OffscreenBrowserCompositorOutputSurface:: |
51 ~OffscreenBrowserCompositorOutputSurface() { | 53 ~OffscreenBrowserCompositorOutputSurface() { |
52 DiscardBackbuffer(); | 54 DiscardBackbuffer(); |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 #if defined(OS_MACOSX) | 168 #if defined(OS_MACOSX) |
167 | 169 |
168 bool OffscreenBrowserCompositorOutputSurface:: | 170 bool OffscreenBrowserCompositorOutputSurface:: |
169 SurfaceShouldNotShowFramesAfterSuspendForRecycle() const { | 171 SurfaceShouldNotShowFramesAfterSuspendForRecycle() const { |
170 return true; | 172 return true; |
171 } | 173 } |
172 | 174 |
173 #endif | 175 #endif |
174 | 176 |
175 } // namespace content | 177 } // namespace content |
OLD | NEW |