| 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 11 matching lines...) Expand all Loading... |
| 22 using cc::CompositorFrame; | 22 using cc::CompositorFrame; |
| 23 using cc::GLFrameData; | 23 using cc::GLFrameData; |
| 24 using cc::ResourceProvider; | 24 using cc::ResourceProvider; |
| 25 using gpu::gles2::GLES2Interface; | 25 using gpu::gles2::GLES2Interface; |
| 26 | 26 |
| 27 namespace content { | 27 namespace content { |
| 28 | 28 |
| 29 OffscreenBrowserCompositorOutputSurface:: | 29 OffscreenBrowserCompositorOutputSurface:: |
| 30 OffscreenBrowserCompositorOutputSurface( | 30 OffscreenBrowserCompositorOutputSurface( |
| 31 const scoped_refptr<ContextProviderCommandBuffer>& context, | 31 const scoped_refptr<ContextProviderCommandBuffer>& context, |
| 32 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, |
| 32 scoped_ptr<BrowserCompositorOverlayCandidateValidator> | 33 scoped_ptr<BrowserCompositorOverlayCandidateValidator> |
| 33 overlay_candidate_validator) | 34 overlay_candidate_validator) |
| 34 : BrowserCompositorOutputSurface(context, | 35 : BrowserCompositorOutputSurface(context, |
| 36 vsync_manager, |
| 35 overlay_candidate_validator.Pass()), | 37 overlay_candidate_validator.Pass()), |
| 36 fbo_(0), | 38 fbo_(0), |
| 37 is_backbuffer_discarded_(false), | 39 is_backbuffer_discarded_(false), |
| 38 backing_texture_id_(0), | 40 backing_texture_id_(0), |
| 39 weak_ptr_factory_(this) { | 41 weak_ptr_factory_(this) { |
| 40 capabilities_.max_frames_pending = 1; | 42 capabilities_.max_frames_pending = 1; |
| 41 capabilities_.uses_default_gl_framebuffer = false; | 43 capabilities_.uses_default_gl_framebuffer = false; |
| 42 } | 44 } |
| 43 | 45 |
| 44 OffscreenBrowserCompositorOutputSurface:: | 46 OffscreenBrowserCompositorOutputSurface:: |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 #if defined(OS_MACOSX) | 134 #if defined(OS_MACOSX) |
| 133 | 135 |
| 134 bool OffscreenBrowserCompositorOutputSurface:: | 136 bool OffscreenBrowserCompositorOutputSurface:: |
| 135 SurfaceShouldNotShowFramesAfterSuspendForRecycle() const { | 137 SurfaceShouldNotShowFramesAfterSuspendForRecycle() const { |
| 136 return true; | 138 return true; |
| 137 } | 139 } |
| 138 | 140 |
| 139 #endif | 141 #endif |
| 140 | 142 |
| 141 } // namespace content | 143 } // namespace content |
| OLD | NEW |