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

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

Issue 2696743002: Prepare CompositorFrameSinkSupport To Be Used By DirectCompositorFrameSink (Closed)
Patch Set: rebase android Created 3 years, 10 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 settings.allow_antialiasing = false; 46 settings.allow_antialiasing = false;
47 settings.highp_threshold_min = 2048; 47 settings.highp_threshold_min = 2048;
48 48
49 // Webview does not own the surface so should not clear it. 49 // Webview does not own the surface so should not clear it.
50 settings.should_clear_root_render_pass = false; 50 settings.should_clear_root_render_pass = false;
51 51
52 surface_manager_.reset(new cc::SurfaceManager); 52 surface_manager_.reset(new cc::SurfaceManager);
53 surface_id_allocator_.reset(new cc::SurfaceIdAllocator()); 53 surface_id_allocator_.reset(new cc::SurfaceIdAllocator());
54 support_.reset(new cc::CompositorFrameSinkSupport( 54 support_.reset(new cc::CompositorFrameSinkSupport(
55 this, surface_manager_.get(), frame_sink_id_, 55 this, surface_manager_.get(), frame_sink_id_,
56 true /* submits_to_display_compositor */)); 56 true /* submits_to_display_compositor */,
57 true /* handles_frame_sink_id_invalidation */,
58 true /* needs_sync_points */));
57 59
58 begin_frame_source_.reset(new cc::StubBeginFrameSource); 60 begin_frame_source_.reset(new cc::StubBeginFrameSource);
59 std::unique_ptr<cc::TextureMailboxDeleter> texture_mailbox_deleter( 61 std::unique_ptr<cc::TextureMailboxDeleter> texture_mailbox_deleter(
60 new cc::TextureMailboxDeleter(nullptr)); 62 new cc::TextureMailboxDeleter(nullptr));
61 std::unique_ptr<ParentOutputSurface> output_surface_holder( 63 std::unique_ptr<ParentOutputSurface> output_surface_holder(
62 new ParentOutputSurface(AwRenderThreadContextProvider::Create( 64 new ParentOutputSurface(AwRenderThreadContextProvider::Create(
63 make_scoped_refptr(new AwGLSurface), 65 make_scoped_refptr(new AwGLSurface),
64 DeferredGpuCommandService::GetInstance()))); 66 DeferredGpuCommandService::GetInstance())));
65 output_surface_ = output_surface_holder.get(); 67 output_surface_ = output_surface_holder.get();
66 std::unique_ptr<cc::DisplayScheduler> scheduler(new cc::DisplayScheduler( 68 std::unique_ptr<cc::DisplayScheduler> scheduler(new cc::DisplayScheduler(
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 168
167 void SurfacesInstance::WillDrawSurface() {} 169 void SurfacesInstance::WillDrawSurface() {}
168 170
169 void SurfacesInstance::ReclaimResources( 171 void SurfacesInstance::ReclaimResources(
170 const cc::ReturnedResourceArray& resources) { 172 const cc::ReturnedResourceArray& resources) {
171 // Root surface should have no resources to return. 173 // Root surface should have no resources to return.
172 CHECK(resources.empty()); 174 CHECK(resources.empty());
173 } 175 }
174 176
175 } // namespace android_webview 177 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698