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

Side by Side Diff: media/gpu/ipc/client/gpu_video_decode_accelerator_host.cc

Issue 2849043002: Send AndroidOverlay routing token from WMPI to AVDA. (Closed)
Patch Set: rebased Created 3 years, 7 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/client/gpu_video_decode_accelerator_host.h" 5 #include "media/gpu/ipc/client/gpu_video_decode_accelerator_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 Send(new AcceleratedVideoDecoderMsg_Flush(decoder_route_id_)); 162 Send(new AcceleratedVideoDecoderMsg_Flush(decoder_route_id_));
163 } 163 }
164 164
165 void GpuVideoDecodeAcceleratorHost::Reset() { 165 void GpuVideoDecodeAcceleratorHost::Reset() {
166 DCHECK(CalledOnValidThread()); 166 DCHECK(CalledOnValidThread());
167 if (!channel_) 167 if (!channel_)
168 return; 168 return;
169 Send(new AcceleratedVideoDecoderMsg_Reset(decoder_route_id_)); 169 Send(new AcceleratedVideoDecoderMsg_Reset(decoder_route_id_));
170 } 170 }
171 171
172 void GpuVideoDecodeAcceleratorHost::SetSurface(int32_t surface_id) { 172 void GpuVideoDecodeAcceleratorHost::SetSurface(
173 int32_t surface_id,
174 const base::Optional<base::UnguessableToken>& routing_token) {
173 DCHECK(CalledOnValidThread()); 175 DCHECK(CalledOnValidThread());
174 if (!channel_) 176 if (!channel_)
175 return; 177 return;
176 Send( 178 Send(new AcceleratedVideoDecoderMsg_SetSurface(decoder_route_id_, surface_id,
177 new AcceleratedVideoDecoderMsg_SetSurface(decoder_route_id_, surface_id)); 179 routing_token));
178 } 180 }
179 181
180 void GpuVideoDecodeAcceleratorHost::Destroy() { 182 void GpuVideoDecodeAcceleratorHost::Destroy() {
181 DCHECK(CalledOnValidThread()); 183 DCHECK(CalledOnValidThread());
182 if (channel_) 184 if (channel_)
183 Send(new AcceleratedVideoDecoderMsg_Destroy(decoder_route_id_)); 185 Send(new AcceleratedVideoDecoderMsg_Destroy(decoder_route_id_));
184 client_ = nullptr; 186 client_ = nullptr;
185 delete this; 187 delete this;
186 } 188 }
187 189
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 weak_this_factory_.InvalidateWeakPtrs(); 289 weak_this_factory_.InvalidateWeakPtrs();
288 290
289 // Client::NotifyError() may Destroy() |this|, so calling it needs to be the 291 // Client::NotifyError() may Destroy() |this|, so calling it needs to be the
290 // last thing done on this stack! 292 // last thing done on this stack!
291 VideoDecodeAccelerator::Client* client = nullptr; 293 VideoDecodeAccelerator::Client* client = nullptr;
292 std::swap(client, client_); 294 std::swap(client, client_);
293 client->NotifyError(static_cast<VideoDecodeAccelerator::Error>(error)); 295 client->NotifyError(static_cast<VideoDecodeAccelerator::Error>(error));
294 } 296 }
295 297
296 } // namespace media 298 } // namespace media
OLDNEW
« no previous file with comments | « media/gpu/ipc/client/gpu_video_decode_accelerator_host.h ('k') | media/gpu/ipc/common/media_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698