| 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 13 matching lines...) Expand all Loading... |
| 24 using gpu::gles2::GLES2Interface; | 24 using gpu::gles2::GLES2Interface; |
| 25 | 25 |
| 26 namespace content { | 26 namespace content { |
| 27 | 27 |
| 28 static cc::ResourceFormat kFboTextureFormat = cc::RGBA_8888; | 28 static cc::ResourceFormat kFboTextureFormat = cc::RGBA_8888; |
| 29 | 29 |
| 30 OffscreenBrowserCompositorOutputSurface:: | 30 OffscreenBrowserCompositorOutputSurface:: |
| 31 OffscreenBrowserCompositorOutputSurface( | 31 OffscreenBrowserCompositorOutputSurface( |
| 32 scoped_refptr<ContextProviderCommandBuffer> context, | 32 scoped_refptr<ContextProviderCommandBuffer> context, |
| 33 scoped_refptr<ui::CompositorVSyncManager> vsync_manager, | 33 scoped_refptr<ui::CompositorVSyncManager> vsync_manager, |
| 34 cc::SyntheticBeginFrameSource* begin_frame_source, | |
| 35 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> | 34 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> |
| 36 overlay_candidate_validator) | 35 overlay_candidate_validator) |
| 37 : BrowserCompositorOutputSurface(std::move(context), | 36 : BrowserCompositorOutputSurface(std::move(context), |
| 38 std::move(vsync_manager), | 37 std::move(vsync_manager), |
| 39 begin_frame_source, | |
| 40 std::move(overlay_candidate_validator)), | 38 std::move(overlay_candidate_validator)), |
| 41 weak_ptr_factory_(this) { | 39 weak_ptr_factory_(this) { |
| 42 capabilities_.uses_default_gl_framebuffer = false; | 40 capabilities_.uses_default_gl_framebuffer = false; |
| 43 } | 41 } |
| 44 | 42 |
| 45 OffscreenBrowserCompositorOutputSurface:: | 43 OffscreenBrowserCompositorOutputSurface:: |
| 46 ~OffscreenBrowserCompositorOutputSurface() { | 44 ~OffscreenBrowserCompositorOutputSurface() { |
| 47 DiscardBackbuffer(); | 45 DiscardBackbuffer(); |
| 48 } | 46 } |
| 49 | 47 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 reflector_changed_ = true; | 183 reflector_changed_ = true; |
| 186 EnsureBackbuffer(); | 184 EnsureBackbuffer(); |
| 187 } | 185 } |
| 188 } | 186 } |
| 189 | 187 |
| 190 void OffscreenBrowserCompositorOutputSurface::OnSwapBuffersComplete() { | 188 void OffscreenBrowserCompositorOutputSurface::OnSwapBuffersComplete() { |
| 191 client_->DidReceiveSwapBuffersAck(); | 189 client_->DidReceiveSwapBuffersAck(); |
| 192 } | 190 } |
| 193 | 191 |
| 194 } // namespace content | 192 } // namespace content |
| OLD | NEW |