| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "android_webview/browser/surfaces_instance.h" | 5 #include "android_webview/browser/surfaces_instance.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "android_webview/browser/aw_gl_surface.h" | 10 #include "android_webview/browser/aw_gl_surface.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 // Webview does not own the surface so should not clear it. | 53 // Webview does not own the surface so should not clear it. |
| 54 settings.should_clear_root_render_pass = false; | 54 settings.should_clear_root_render_pass = false; |
| 55 | 55 |
| 56 surface_manager_.reset(new cc::SurfaceManager); | 56 surface_manager_.reset(new cc::SurfaceManager); |
| 57 local_surface_id_allocator_.reset(new cc::LocalSurfaceIdAllocator()); | 57 local_surface_id_allocator_.reset(new cc::LocalSurfaceIdAllocator()); |
| 58 | 58 |
| 59 constexpr bool is_root = true; | 59 constexpr bool is_root = true; |
| 60 constexpr bool handles_frame_sink_id_invalidation = true; | 60 constexpr bool handles_frame_sink_id_invalidation = true; |
| 61 constexpr bool needs_sync_points = true; | 61 constexpr bool needs_sync_points = true; |
| 62 support_.reset(new cc::CompositorFrameSinkSupport( | 62 support_ = cc::CompositorFrameSinkSupport::Create( |
| 63 this, surface_manager_.get(), frame_sink_id_, is_root, | 63 this, surface_manager_.get(), frame_sink_id_, is_root, |
| 64 handles_frame_sink_id_invalidation, needs_sync_points)); | 64 handles_frame_sink_id_invalidation, needs_sync_points); |
| 65 | 65 |
| 66 begin_frame_source_.reset(new cc::StubBeginFrameSource); | 66 begin_frame_source_.reset(new cc::StubBeginFrameSource); |
| 67 std::unique_ptr<cc::TextureMailboxDeleter> texture_mailbox_deleter( | 67 std::unique_ptr<cc::TextureMailboxDeleter> texture_mailbox_deleter( |
| 68 new cc::TextureMailboxDeleter(nullptr)); | 68 new cc::TextureMailboxDeleter(nullptr)); |
| 69 std::unique_ptr<ParentOutputSurface> output_surface_holder( | 69 std::unique_ptr<ParentOutputSurface> output_surface_holder( |
| 70 new ParentOutputSurface(AwRenderThreadContextProvider::Create( | 70 new ParentOutputSurface(AwRenderThreadContextProvider::Create( |
| 71 make_scoped_refptr(new AwGLSurface), | 71 make_scoped_refptr(new AwGLSurface), |
| 72 DeferredGpuCommandService::GetInstance()))); | 72 DeferredGpuCommandService::GetInstance()))); |
| 73 output_surface_ = output_surface_holder.get(); | 73 output_surface_ = output_surface_holder.get(); |
| 74 std::unique_ptr<cc::DisplayScheduler> scheduler(new cc::DisplayScheduler( | 74 std::unique_ptr<cc::DisplayScheduler> scheduler(new cc::DisplayScheduler( |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 const cc::LocalSurfaceId& local_surface_id, | 183 const cc::LocalSurfaceId& local_surface_id, |
| 184 const gfx::Rect& damage_rect) {} | 184 const gfx::Rect& damage_rect) {} |
| 185 | 185 |
| 186 void SurfacesInstance::ReclaimResources( | 186 void SurfacesInstance::ReclaimResources( |
| 187 const cc::ReturnedResourceArray& resources) { | 187 const cc::ReturnedResourceArray& resources) { |
| 188 // Root surface should have no resources to return. | 188 // Root surface should have no resources to return. |
| 189 CHECK(resources.empty()); | 189 CHECK(resources.empty()); |
| 190 } | 190 } |
| 191 | 191 |
| 192 } // namespace android_webview | 192 } // namespace android_webview |
| OLD | NEW |