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

Side by Side Diff: media/gpu/ipc/service/gpu_video_decode_accelerator.cc

Issue 2892083002: Send enter / exit fullscreen signal to AVDA (Closed)
Patch Set: rebased. Created 3 years, 6 months 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
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 "media/gpu/ipc/service/gpu_video_decode_accelerator.h" 5 #include "media/gpu/ipc/service/gpu_video_decode_accelerator.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 bool handled = true; 204 bool handled = true;
205 IPC_BEGIN_MESSAGE_MAP(GpuVideoDecodeAccelerator, msg) 205 IPC_BEGIN_MESSAGE_MAP(GpuVideoDecodeAccelerator, msg)
206 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_Decode, OnDecode) 206 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_Decode, OnDecode)
207 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_AssignPictureBuffers, 207 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_AssignPictureBuffers,
208 OnAssignPictureBuffers) 208 OnAssignPictureBuffers)
209 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_ReusePictureBuffer, 209 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_ReusePictureBuffer,
210 OnReusePictureBuffer) 210 OnReusePictureBuffer)
211 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_Flush, OnFlush) 211 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_Flush, OnFlush)
212 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_Reset, OnReset) 212 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_Reset, OnReset)
213 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_SetSurface, OnSetSurface) 213 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_SetOverlayInfo,
214 OnSetOverlayInfo)
214 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_Destroy, OnDestroy) 215 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_Destroy, OnDestroy)
215 IPC_MESSAGE_UNHANDLED(handled = false) 216 IPC_MESSAGE_UNHANDLED(handled = false)
216 IPC_END_MESSAGE_MAP() 217 IPC_END_MESSAGE_MAP()
217 return handled; 218 return handled;
218 } 219 }
219 220
220 void GpuVideoDecodeAccelerator::NotifyInitializationComplete(bool success) { 221 void GpuVideoDecodeAccelerator::NotifyInitializationComplete(bool success) {
221 if (!Send(new AcceleratedVideoDecoderHostMsg_InitializationComplete( 222 if (!Send(new AcceleratedVideoDecoderHostMsg_InitializationComplete(
222 host_route_id_, success))) 223 host_route_id_, success)))
223 DLOG(ERROR) 224 DLOG(ERROR)
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 void GpuVideoDecodeAccelerator::OnFlush() { 504 void GpuVideoDecodeAccelerator::OnFlush() {
504 DCHECK(video_decode_accelerator_); 505 DCHECK(video_decode_accelerator_);
505 video_decode_accelerator_->Flush(); 506 video_decode_accelerator_->Flush();
506 } 507 }
507 508
508 void GpuVideoDecodeAccelerator::OnReset() { 509 void GpuVideoDecodeAccelerator::OnReset() {
509 DCHECK(video_decode_accelerator_); 510 DCHECK(video_decode_accelerator_);
510 video_decode_accelerator_->Reset(); 511 video_decode_accelerator_->Reset();
511 } 512 }
512 513
513 void GpuVideoDecodeAccelerator::OnSetSurface( 514 void GpuVideoDecodeAccelerator::OnSetOverlayInfo(
514 int32_t surface_id, 515 const OverlayInfo& overlay_info) {
515 const base::Optional<base::UnguessableToken>& routing_token) {
516 DCHECK(video_decode_accelerator_); 516 DCHECK(video_decode_accelerator_);
517 video_decode_accelerator_->SetSurface(surface_id, routing_token); 517 video_decode_accelerator_->SetOverlayInfo(overlay_info);
518 } 518 }
519 519
520 void GpuVideoDecodeAccelerator::OnDestroy() { 520 void GpuVideoDecodeAccelerator::OnDestroy() {
521 DCHECK(video_decode_accelerator_); 521 DCHECK(video_decode_accelerator_);
522 OnWillDestroyStub(); 522 OnWillDestroyStub();
523 } 523 }
524 524
525 void GpuVideoDecodeAccelerator::OnFilterRemoved() { 525 void GpuVideoDecodeAccelerator::OnFilterRemoved() {
526 // We're destroying; cancel all callbacks. 526 // We're destroying; cancel all callbacks.
527 weak_factory_for_io_.InvalidateWeakPtrs(); 527 weak_factory_for_io_.InvalidateWeakPtrs();
(...skipping 10 matching lines...) Expand all
538 for (auto texture_ref : it->second) { 538 for (auto texture_ref : it->second) {
539 GLenum target = texture_ref->texture()->target(); 539 GLenum target = texture_ref->texture()->target();
540 gpu::gles2::TextureManager* texture_manager = 540 gpu::gles2::TextureManager* texture_manager =
541 stub_->decoder()->GetContextGroup()->texture_manager(); 541 stub_->decoder()->GetContextGroup()->texture_manager();
542 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); 542 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true);
543 } 543 }
544 uncleared_textures_.erase(it); 544 uncleared_textures_.erase(it);
545 } 545 }
546 546
547 } // namespace media 547 } // namespace media
OLDNEW
« no previous file with comments | « media/gpu/ipc/service/gpu_video_decode_accelerator.h ('k') | media/video/video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698