Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: android_webview/browser/surfaces_instance.cc

Issue 2807653003: Move Work From CompositorFrameSinkSupport() To Init() (Closed)
Patch Set: More Init Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_.reset(new cc::CompositorFrameSinkSupport(
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 support_->Init();
65 66
66 begin_frame_source_.reset(new cc::StubBeginFrameSource); 67 begin_frame_source_.reset(new cc::StubBeginFrameSource);
67 std::unique_ptr<cc::TextureMailboxDeleter> texture_mailbox_deleter( 68 std::unique_ptr<cc::TextureMailboxDeleter> texture_mailbox_deleter(
68 new cc::TextureMailboxDeleter(nullptr)); 69 new cc::TextureMailboxDeleter(nullptr));
69 std::unique_ptr<ParentOutputSurface> output_surface_holder( 70 std::unique_ptr<ParentOutputSurface> output_surface_holder(
70 new ParentOutputSurface(AwRenderThreadContextProvider::Create( 71 new ParentOutputSurface(AwRenderThreadContextProvider::Create(
71 make_scoped_refptr(new AwGLSurface), 72 make_scoped_refptr(new AwGLSurface),
72 DeferredGpuCommandService::GetInstance()))); 73 DeferredGpuCommandService::GetInstance())));
73 output_surface_ = output_surface_holder.get(); 74 output_surface_ = output_surface_holder.get();
74 std::unique_ptr<cc::DisplayScheduler> scheduler(new cc::DisplayScheduler( 75 std::unique_ptr<cc::DisplayScheduler> scheduler(new cc::DisplayScheduler(
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 const cc::LocalSurfaceId& local_surface_id, 184 const cc::LocalSurfaceId& local_surface_id,
184 const gfx::Rect& damage_rect) {} 185 const gfx::Rect& damage_rect) {}
185 186
186 void SurfacesInstance::ReclaimResources( 187 void SurfacesInstance::ReclaimResources(
187 const cc::ReturnedResourceArray& resources) { 188 const cc::ReturnedResourceArray& resources) {
188 // Root surface should have no resources to return. 189 // Root surface should have no resources to return.
189 CHECK(resources.empty()); 190 CHECK(resources.empty());
190 } 191 }
191 192
192 } // namespace android_webview 193 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698