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 23 matching lines...) Expand all Loading... |
34 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, | 34 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, |
35 scoped_ptr<BrowserCompositorOverlayCandidateValidator> | 35 scoped_ptr<BrowserCompositorOverlayCandidateValidator> |
36 overlay_candidate_validator) | 36 overlay_candidate_validator) |
37 : BrowserCompositorOutputSurface(context, | 37 : BrowserCompositorOutputSurface(context, |
38 worker_context, | 38 worker_context, |
39 vsync_manager, | 39 vsync_manager, |
40 overlay_candidate_validator.Pass()), | 40 overlay_candidate_validator.Pass()), |
41 fbo_(0), | 41 fbo_(0), |
42 is_backbuffer_discarded_(false), | 42 is_backbuffer_discarded_(false), |
43 weak_ptr_factory_(this) { | 43 weak_ptr_factory_(this) { |
44 capabilities_.max_frames_pending = 1; | |
45 capabilities_.uses_default_gl_framebuffer = false; | 44 capabilities_.uses_default_gl_framebuffer = false; |
46 } | 45 } |
47 | 46 |
48 OffscreenBrowserCompositorOutputSurface:: | 47 OffscreenBrowserCompositorOutputSurface:: |
49 ~OffscreenBrowserCompositorOutputSurface() { | 48 ~OffscreenBrowserCompositorOutputSurface() { |
50 DiscardBackbuffer(); | 49 DiscardBackbuffer(); |
51 } | 50 } |
52 | 51 |
53 void OffscreenBrowserCompositorOutputSurface::EnsureBackbuffer() { | 52 void OffscreenBrowserCompositorOutputSurface::EnsureBackbuffer() { |
54 is_backbuffer_discarded_ = false; | 53 is_backbuffer_discarded_ = false; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 #if defined(OS_MACOSX) | 162 #if defined(OS_MACOSX) |
164 | 163 |
165 bool OffscreenBrowserCompositorOutputSurface:: | 164 bool OffscreenBrowserCompositorOutputSurface:: |
166 SurfaceShouldNotShowFramesAfterSuspendForRecycle() const { | 165 SurfaceShouldNotShowFramesAfterSuspendForRecycle() const { |
167 return true; | 166 return true; |
168 } | 167 } |
169 | 168 |
170 #endif | 169 #endif |
171 | 170 |
172 } // namespace content | 171 } // namespace content |
OLD | NEW |