| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 #if defined(OS_MACOSX) | 158 #if defined(OS_MACOSX) |
| 160 | 159 |
| 161 bool OffscreenBrowserCompositorOutputSurface:: | 160 bool OffscreenBrowserCompositorOutputSurface:: |
| 162 SurfaceShouldNotShowFramesAfterSuspendForRecycle() const { | 161 SurfaceShouldNotShowFramesAfterSuspendForRecycle() const { |
| 163 return true; | 162 return true; |
| 164 } | 163 } |
| 165 | 164 |
| 166 #endif | 165 #endif |
| 167 | 166 |
| 168 } // namespace content | 167 } // namespace content |
| OLD | NEW |