Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 161 return false; | 161 return false; |
| 162 | 162 |
| 163 DCHECK(begin_frame_source_); | 163 DCHECK(begin_frame_source_); |
| 164 client_->SetBeginFrameSource(begin_frame_source_.get()); | 164 client_->SetBeginFrameSource(begin_frame_source_.get()); |
| 165 client_->SetMemoryPolicy(memory_policy_); | 165 client_->SetMemoryPolicy(memory_policy_); |
| 166 client_->SetTreeActivationCallback( | 166 client_->SetTreeActivationCallback( |
| 167 base::Bind(&SynchronousCompositorFrameSink::DidActivatePendingTree, | 167 base::Bind(&SynchronousCompositorFrameSink::DidActivatePendingTree, |
| 168 base::Unretained(this))); | 168 base::Unretained(this))); |
| 169 registry_->RegisterCompositorFrameSink(routing_id_, this); | 169 registry_->RegisterCompositorFrameSink(routing_id_, this); |
| 170 | 170 |
| 171 const bool root_submits_to_display_compositor = true; | |
|
danakj
2017/02/14 16:54:01
We were talking about names with fsamuel the other
| |
| 172 const bool child_submits_to_display_compositor = false; | |
| 173 const bool handles_frame_sink_id_invalidation = true; | |
| 174 const bool needs_sync_points = true; | |
| 171 root_support_.reset(new cc::CompositorFrameSinkSupport( | 175 root_support_.reset(new cc::CompositorFrameSinkSupport( |
| 172 this, surface_manager_.get(), kRootFrameSinkId, | 176 this, surface_manager_.get(), kRootFrameSinkId, |
| 173 true /* submits_to_display_compositor */)); | 177 root_submits_to_display_compositor, handles_frame_sink_id_invalidation, |
| 178 needs_sync_points)); | |
| 174 child_support_.reset(new cc::CompositorFrameSinkSupport( | 179 child_support_.reset(new cc::CompositorFrameSinkSupport( |
| 175 this, surface_manager_.get(), kChildFrameSinkId, | 180 this, surface_manager_.get(), kChildFrameSinkId, |
| 176 false /* submits_to_display_compositor */)); | 181 child_submits_to_display_compositor, handles_frame_sink_id_invalidation, |
| 182 needs_sync_points)); | |
| 177 | 183 |
| 178 cc::RendererSettings software_renderer_settings; | 184 cc::RendererSettings software_renderer_settings; |
| 179 | 185 |
| 180 auto output_surface = base::MakeUnique<SoftwareOutputSurface>( | 186 auto output_surface = base::MakeUnique<SoftwareOutputSurface>( |
| 181 base::MakeUnique<SoftwareDevice>(¤t_sw_canvas_)); | 187 base::MakeUnique<SoftwareDevice>(¤t_sw_canvas_)); |
| 182 software_output_surface_ = output_surface.get(); | 188 software_output_surface_ = output_surface.get(); |
| 183 | 189 |
| 184 // The shared_bitmap_manager and gpu_memory_buffer_manager here are null as | 190 // The shared_bitmap_manager and gpu_memory_buffer_manager here are null as |
| 185 // this Display is only used for resourcesless software draws, where no | 191 // this Display is only used for resourcesless software draws, where no |
| 186 // resources are included in the frame swapped from the compositor. So there | 192 // resources are included in the frame swapped from the compositor. So there |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 458 | 464 |
| 459 void SynchronousCompositorFrameSink::ReclaimResources( | 465 void SynchronousCompositorFrameSink::ReclaimResources( |
| 460 const cc::ReturnedResourceArray& resources) { | 466 const cc::ReturnedResourceArray& resources) { |
| 461 DCHECK(resources.empty()); | 467 DCHECK(resources.empty()); |
| 462 client_->ReclaimResources(resources); | 468 client_->ReclaimResources(resources); |
| 463 } | 469 } |
| 464 | 470 |
| 465 void SynchronousCompositorFrameSink::WillDrawSurface() {} | 471 void SynchronousCompositorFrameSink::WillDrawSurface() {} |
| 466 | 472 |
| 467 } // namespace content | 473 } // namespace content |
| OLD | NEW |