| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/gpu/gpu_child_thread.h" | 5 #include "content/gpu/gpu_child_thread.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #include "ui/gl/gpu_switching_manager.h" | 44 #include "ui/gl/gpu_switching_manager.h" |
| 45 #include "ui/gl/init/gl_factory.h" | 45 #include "ui/gl/init/gl_factory.h" |
| 46 #include "url/gurl.h" | 46 #include "url/gurl.h" |
| 47 | 47 |
| 48 #if defined(USE_OZONE) | 48 #if defined(USE_OZONE) |
| 49 #include "ui/ozone/public/ozone_platform.h" | 49 #include "ui/ozone/public/ozone_platform.h" |
| 50 #endif | 50 #endif |
| 51 | 51 |
| 52 #if defined(OS_ANDROID) | 52 #if defined(OS_ANDROID) |
| 53 #include "media/base/android/media_client_android.h" | 53 #include "media/base/android/media_client_android.h" |
| 54 #include "media/gpu/avda_surface_tracker.h" | 54 #include "media/gpu/avda_codec_allocator.h" |
| 55 #endif | 55 #endif |
| 56 | 56 |
| 57 namespace content { | 57 namespace content { |
| 58 namespace { | 58 namespace { |
| 59 | 59 |
| 60 static base::LazyInstance<scoped_refptr<ThreadSafeSender> > | 60 static base::LazyInstance<scoped_refptr<ThreadSafeSender> > |
| 61 g_thread_safe_sender = LAZY_INSTANCE_INITIALIZER; | 61 g_thread_safe_sender = LAZY_INSTANCE_INITIALIZER; |
| 62 | 62 |
| 63 bool GpuProcessLogMessageHandler(int severity, | 63 bool GpuProcessLogMessageHandler(int severity, |
| 64 const char* file, int line, | 64 const char* file, int line, |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 gpu_channel_manager_->DestroyGpuMemoryBuffer(id, client_id, sync_token); | 503 gpu_channel_manager_->DestroyGpuMemoryBuffer(id, client_id, sync_token); |
| 504 } | 504 } |
| 505 | 505 |
| 506 #if defined(OS_ANDROID) | 506 #if defined(OS_ANDROID) |
| 507 void GpuChildThread::OnWakeUpGpu() { | 507 void GpuChildThread::OnWakeUpGpu() { |
| 508 if (gpu_channel_manager_) | 508 if (gpu_channel_manager_) |
| 509 gpu_channel_manager_->WakeUpGpu(); | 509 gpu_channel_manager_->WakeUpGpu(); |
| 510 } | 510 } |
| 511 | 511 |
| 512 void GpuChildThread::OnDestroyingVideoSurface(int surface_id) { | 512 void GpuChildThread::OnDestroyingVideoSurface(int surface_id) { |
| 513 media::AVDASurfaceTracker::GetInstance()->NotifyDestroyingSurface(surface_id); | 513 media::AVDACodecAllocator::Get().OnSurfaceDestroyed(surface_id); |
| 514 Send(new GpuHostMsg_DestroyingVideoSurfaceAck(surface_id)); | 514 Send(new GpuHostMsg_DestroyingVideoSurfaceAck(surface_id)); |
| 515 } | 515 } |
| 516 #endif | 516 #endif |
| 517 | 517 |
| 518 void GpuChildThread::OnLoseAllContexts() { | 518 void GpuChildThread::OnLoseAllContexts() { |
| 519 if (gpu_channel_manager_) { | 519 if (gpu_channel_manager_) { |
| 520 gpu_channel_manager_->DestroyAllChannels(); | 520 gpu_channel_manager_->DestroyAllChannels(); |
| 521 media_gpu_channel_manager_->DestroyAllChannels(); | 521 media_gpu_channel_manager_->DestroyAllChannels(); |
| 522 } | 522 } |
| 523 } | 523 } |
| 524 | 524 |
| 525 void GpuChildThread::BindServiceFactoryRequest( | 525 void GpuChildThread::BindServiceFactoryRequest( |
| 526 service_manager::mojom::ServiceFactoryRequest request) { | 526 service_manager::mojom::ServiceFactoryRequest request) { |
| 527 DVLOG(1) << "GPU: Binding service_manager::mojom::ServiceFactoryRequest"; | 527 DVLOG(1) << "GPU: Binding service_manager::mojom::ServiceFactoryRequest"; |
| 528 DCHECK(service_factory_); | 528 DCHECK(service_factory_); |
| 529 service_factory_bindings_.AddBinding(service_factory_.get(), | 529 service_factory_bindings_.AddBinding(service_factory_.get(), |
| 530 std::move(request)); | 530 std::move(request)); |
| 531 } | 531 } |
| 532 | 532 |
| 533 } // namespace content | 533 } // namespace content |
| OLD | NEW |