| 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_output_surface.h" | 5 #include "content/renderer/android/synchronous_compositor_output_surface.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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 // this Display is only used for resourcesless software draws, where no | 169 // this Display is only used for resourcesless software draws, where no |
| 170 // resources are included in the frame swapped from the compositor. So there | 170 // resources are included in the frame swapped from the compositor. So there |
| 171 // is no need for these. | 171 // is no need for these. |
| 172 display_.reset(new cc::Display( | 172 display_.reset(new cc::Display( |
| 173 nullptr /* shared_bitmap_manager */, | 173 nullptr /* shared_bitmap_manager */, |
| 174 nullptr /* gpu_memory_buffer_manager */, software_renderer_settings, | 174 nullptr /* gpu_memory_buffer_manager */, software_renderer_settings, |
| 175 nullptr /* begin_frame_source */, std::move(output_surface), | 175 nullptr /* begin_frame_source */, std::move(output_surface), |
| 176 nullptr /* scheduler */, nullptr /* texture_mailbox_deleter */)); | 176 nullptr /* scheduler */, nullptr /* texture_mailbox_deleter */)); |
| 177 display_->Initialize(&display_client_, surface_manager_.get(), | 177 display_->Initialize(&display_client_, surface_manager_.get(), |
| 178 surface_id_allocator_->client_id()); | 178 surface_id_allocator_->client_id()); |
| 179 display_->SetVisible(true); |
| 179 return true; | 180 return true; |
| 180 } | 181 } |
| 181 | 182 |
| 182 void SynchronousCompositorOutputSurface::DetachFromClient() { | 183 void SynchronousCompositorOutputSurface::DetachFromClient() { |
| 183 DCHECK(CalledOnValidThread()); | 184 DCHECK(CalledOnValidThread()); |
| 184 if (registered_) { | 185 if (registered_) { |
| 185 registry_->UnregisterOutputSurface(routing_id_, this); | 186 registry_->UnregisterOutputSurface(routing_id_, this); |
| 186 } | 187 } |
| 187 client_->SetTreeActivationCallback(base::Closure()); | 188 client_->SetTreeActivationCallback(base::Closure()); |
| 188 if (!delegated_surface_id_.is_null()) | 189 if (!delegated_surface_id_.is_null()) |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 client_->ReclaimResources(resources); | 419 client_->ReclaimResources(resources); |
| 419 } | 420 } |
| 420 | 421 |
| 421 void SynchronousCompositorOutputSurface::SetBeginFrameSource( | 422 void SynchronousCompositorOutputSurface::SetBeginFrameSource( |
| 422 cc::BeginFrameSource* begin_frame_source) { | 423 cc::BeginFrameSource* begin_frame_source) { |
| 423 // Software output is synchronous and doesn't use a BeginFrameSource. | 424 // Software output is synchronous and doesn't use a BeginFrameSource. |
| 424 NOTREACHED(); | 425 NOTREACHED(); |
| 425 } | 426 } |
| 426 | 427 |
| 427 } // namespace content | 428 } // namespace content |
| OLD | NEW |