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

Side by Side Diff: content/renderer/android/synchronous_compositor_frame_sink.cc

Issue 2807653003: Move Work From CompositorFrameSinkSupport() To Init() (Closed)
Patch Set: Add CompositorFrameSinkSupport::Create 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/renderer/android/synchronous_compositor_frame_sink.h" 5 #include "content/renderer/android/synchronous_compositor_frame_sink.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 client_->SetMemoryPolicy(memory_policy_); 168 client_->SetMemoryPolicy(memory_policy_);
169 client_->SetTreeActivationCallback( 169 client_->SetTreeActivationCallback(
170 base::Bind(&SynchronousCompositorFrameSink::DidActivatePendingTree, 170 base::Bind(&SynchronousCompositorFrameSink::DidActivatePendingTree,
171 base::Unretained(this))); 171 base::Unretained(this)));
172 registry_->RegisterCompositorFrameSink(routing_id_, this); 172 registry_->RegisterCompositorFrameSink(routing_id_, this);
173 173
174 constexpr bool root_support_is_root = true; 174 constexpr bool root_support_is_root = true;
175 constexpr bool child_support_is_root = false; 175 constexpr bool child_support_is_root = false;
176 constexpr bool handles_frame_sink_id_invalidation = true; 176 constexpr bool handles_frame_sink_id_invalidation = true;
177 constexpr bool needs_sync_points = true; 177 constexpr bool needs_sync_points = true;
178 root_support_.reset(new cc::CompositorFrameSinkSupport( 178 root_support_ = cc::CompositorFrameSinkSupport::Create(
179 this, surface_manager_.get(), kRootFrameSinkId, root_support_is_root, 179 this, surface_manager_.get(), kRootFrameSinkId, root_support_is_root,
180 handles_frame_sink_id_invalidation, needs_sync_points)); 180 handles_frame_sink_id_invalidation, needs_sync_points);
181 child_support_.reset(new cc::CompositorFrameSinkSupport( 181 child_support_ = cc::CompositorFrameSinkSupport::Create(
182 this, surface_manager_.get(), kChildFrameSinkId, child_support_is_root, 182 this, surface_manager_.get(), kChildFrameSinkId, child_support_is_root,
183 handles_frame_sink_id_invalidation, needs_sync_points)); 183 handles_frame_sink_id_invalidation, needs_sync_points);
184 184
185 cc::RendererSettings software_renderer_settings; 185 cc::RendererSettings software_renderer_settings;
186 186
187 auto output_surface = base::MakeUnique<SoftwareOutputSurface>( 187 auto output_surface = base::MakeUnique<SoftwareOutputSurface>(
188 base::MakeUnique<SoftwareDevice>(&current_sw_canvas_)); 188 base::MakeUnique<SoftwareDevice>(&current_sw_canvas_));
189 software_output_surface_ = output_surface.get(); 189 software_output_surface_ = output_surface.get();
190 190
191 // The gpu_memory_buffer_manager here is null as the Display is only used for 191 // The gpu_memory_buffer_manager here is null as the Display is only used for
192 // resourcesless software draws, where no resources are included in the frame 192 // resourcesless software draws, where no resources are included in the frame
193 // swapped from the compositor. So there is no need for it. 193 // swapped from the compositor. So there is no need for it.
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 const cc::ReturnedResourceArray& resources) { 471 const cc::ReturnedResourceArray& resources) {
472 DCHECK(resources.empty()); 472 DCHECK(resources.empty());
473 client_->ReclaimResources(resources); 473 client_->ReclaimResources(resources);
474 } 474 }
475 475
476 void SynchronousCompositorFrameSink::WillDrawSurface( 476 void SynchronousCompositorFrameSink::WillDrawSurface(
477 const cc::LocalSurfaceId& local_surface_id, 477 const cc::LocalSurfaceId& local_surface_id,
478 const gfx::Rect& damage_rect) {} 478 const gfx::Rect& damage_rect) {}
479 479
480 } // namespace content 480 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.cc ('k') | ui/android/delegated_frame_host_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698