| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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_.reset(new cc::CompositorFrameSinkSupport( |
| 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 root_support_->Init(); |
| 181 child_support_.reset(new cc::CompositorFrameSinkSupport( | 182 child_support_.reset(new cc::CompositorFrameSinkSupport( |
| 182 this, surface_manager_.get(), kChildFrameSinkId, child_support_is_root, | 183 this, surface_manager_.get(), kChildFrameSinkId, child_support_is_root, |
| 183 handles_frame_sink_id_invalidation, needs_sync_points)); | 184 handles_frame_sink_id_invalidation, needs_sync_points)); |
| 185 child_support_->Init(); |
| 184 | 186 |
| 185 cc::RendererSettings software_renderer_settings; | 187 cc::RendererSettings software_renderer_settings; |
| 186 | 188 |
| 187 auto output_surface = base::MakeUnique<SoftwareOutputSurface>( | 189 auto output_surface = base::MakeUnique<SoftwareOutputSurface>( |
| 188 base::MakeUnique<SoftwareDevice>(¤t_sw_canvas_)); | 190 base::MakeUnique<SoftwareDevice>(¤t_sw_canvas_)); |
| 189 software_output_surface_ = output_surface.get(); | 191 software_output_surface_ = output_surface.get(); |
| 190 | 192 |
| 191 // The gpu_memory_buffer_manager here is null as the Display is only used for | 193 // 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 | 194 // resourcesless software draws, where no resources are included in the frame |
| 193 // swapped from the compositor. So there is no need for it. | 195 // swapped from the compositor. So there is no need for it. |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 const cc::ReturnedResourceArray& resources) { | 473 const cc::ReturnedResourceArray& resources) { |
| 472 DCHECK(resources.empty()); | 474 DCHECK(resources.empty()); |
| 473 client_->ReclaimResources(resources); | 475 client_->ReclaimResources(resources); |
| 474 } | 476 } |
| 475 | 477 |
| 476 void SynchronousCompositorFrameSink::WillDrawSurface( | 478 void SynchronousCompositorFrameSink::WillDrawSurface( |
| 477 const cc::LocalSurfaceId& local_surface_id, | 479 const cc::LocalSurfaceId& local_surface_id, |
| 478 const gfx::Rect& damage_rect) {} | 480 const gfx::Rect& damage_rect) {} |
| 479 | 481 |
| 480 } // namespace content | 482 } // namespace content |
| OLD | NEW |