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

Side by Side Diff: content/gpu/gpu_child_thread.cc

Issue 2508053002: media: Do a TimedWait() for video surface teardown in AVDA (Closed)
Patch Set: change timeout to 2 Created 4 years, 1 month 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
« no previous file with comments | « no previous file | media/gpu/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "ui/gl/gpu_switching_manager.h" 43 #include "ui/gl/gpu_switching_manager.h"
44 #include "ui/gl/init/gl_factory.h" 44 #include "ui/gl/init/gl_factory.h"
45 #include "url/gurl.h" 45 #include "url/gurl.h"
46 46
47 #if defined(USE_OZONE) 47 #if defined(USE_OZONE)
48 #include "ui/ozone/public/ozone_platform.h" 48 #include "ui/ozone/public/ozone_platform.h"
49 #endif 49 #endif
50 50
51 #if defined(OS_ANDROID) 51 #if defined(OS_ANDROID)
52 #include "media/base/android/media_client_android.h" 52 #include "media/base/android/media_client_android.h"
53 #include "media/gpu/avda_surface_tracker.h" 53 #include "media/gpu/avda_codec_allocator.h"
54 #endif 54 #endif
55 55
56 namespace content { 56 namespace content {
57 namespace { 57 namespace {
58 58
59 static base::LazyInstance<scoped_refptr<ThreadSafeSender> > 59 static base::LazyInstance<scoped_refptr<ThreadSafeSender> >
60 g_thread_safe_sender = LAZY_INSTANCE_INITIALIZER; 60 g_thread_safe_sender = LAZY_INSTANCE_INITIALIZER;
61 61
62 bool GpuProcessLogMessageHandler(int severity, 62 bool GpuProcessLogMessageHandler(int severity,
63 const char* file, int line, 63 const char* file, int line,
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 gpu_channel_manager_->DestroyGpuMemoryBuffer(id, client_id, sync_token); 502 gpu_channel_manager_->DestroyGpuMemoryBuffer(id, client_id, sync_token);
503 } 503 }
504 504
505 #if defined(OS_ANDROID) 505 #if defined(OS_ANDROID)
506 void GpuChildThread::OnWakeUpGpu() { 506 void GpuChildThread::OnWakeUpGpu() {
507 if (gpu_channel_manager_) 507 if (gpu_channel_manager_)
508 gpu_channel_manager_->WakeUpGpu(); 508 gpu_channel_manager_->WakeUpGpu();
509 } 509 }
510 510
511 void GpuChildThread::OnDestroyingVideoSurface(int surface_id) { 511 void GpuChildThread::OnDestroyingVideoSurface(int surface_id) {
512 media::AVDASurfaceTracker::GetInstance()->NotifyDestroyingSurface(surface_id); 512 media::AVDACodecAllocator::Instance()->OnSurfaceDestroyed(surface_id);
513 Send(new GpuHostMsg_DestroyingVideoSurfaceAck(surface_id)); 513 Send(new GpuHostMsg_DestroyingVideoSurfaceAck(surface_id));
514 } 514 }
515 #endif 515 #endif
516 516
517 void GpuChildThread::OnLoseAllContexts() { 517 void GpuChildThread::OnLoseAllContexts() {
518 if (gpu_channel_manager_) { 518 if (gpu_channel_manager_) {
519 gpu_channel_manager_->DestroyAllChannels(); 519 gpu_channel_manager_->DestroyAllChannels();
520 media_gpu_channel_manager_->DestroyAllChannels(); 520 media_gpu_channel_manager_->DestroyAllChannels();
521 } 521 }
522 } 522 }
523 523
524 void GpuChildThread::BindServiceFactoryRequest( 524 void GpuChildThread::BindServiceFactoryRequest(
525 service_manager::mojom::ServiceFactoryRequest request) { 525 service_manager::mojom::ServiceFactoryRequest request) {
526 DVLOG(1) << "GPU: Binding service_manager::mojom::ServiceFactoryRequest"; 526 DVLOG(1) << "GPU: Binding service_manager::mojom::ServiceFactoryRequest";
527 DCHECK(service_factory_); 527 DCHECK(service_factory_);
528 service_factory_bindings_.AddBinding(service_factory_.get(), 528 service_factory_bindings_.AddBinding(service_factory_.get(),
529 std::move(request)); 529 std::move(request));
530 } 530 }
531 531
532 } // namespace content 532 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | media/gpu/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698