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

Side by Side Diff: content/common/gpu/media/gpu_video_decode_accelerator.cc

Issue 645713002: Switch to using make_context_current in VTVideoDecodeAccelerator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@vt_errror_handling
Patch Set: Rebase again? Created 6 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 | content/common/gpu/media/vt_video_decode_accelerator.h » ('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/common/gpu/media/gpu_video_decode_accelerator.h" 5 #include "content/common/gpu/media/gpu_video_decode_accelerator.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 NOTIMPLEMENTED() << "HW video decode acceleration not available."; 250 NOTIMPLEMENTED() << "HW video decode acceleration not available.";
251 SendCreateDecoderReply(init_done_msg, false); 251 SendCreateDecoderReply(init_done_msg, false);
252 return; 252 return;
253 } 253 }
254 DVLOG(0) << "Initializing DXVA HW decoder for windows."; 254 DVLOG(0) << "Initializing DXVA HW decoder for windows.";
255 video_decode_accelerator_.reset( 255 video_decode_accelerator_.reset(
256 new DXVAVideoDecodeAccelerator(make_context_current_)); 256 new DXVAVideoDecodeAccelerator(make_context_current_));
257 #elif defined(OS_MACOSX) 257 #elif defined(OS_MACOSX)
258 video_decode_accelerator_.reset(new VTVideoDecodeAccelerator( 258 video_decode_accelerator_.reset(new VTVideoDecodeAccelerator(
259 static_cast<CGLContextObj>( 259 static_cast<CGLContextObj>(
260 stub_->decoder()->GetGLContext()->GetHandle()))); 260 stub_->decoder()->GetGLContext()->GetHandle()),
261 make_context_current_));
261 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11) 262 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11)
262 scoped_ptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); 263 scoped_ptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder);
263 if (!device.get()) { 264 if (!device.get()) {
264 SendCreateDecoderReply(init_done_msg, false); 265 SendCreateDecoderReply(init_done_msg, false);
265 return; 266 return;
266 } 267 }
267 video_decode_accelerator_.reset(new V4L2VideoDecodeAccelerator( 268 video_decode_accelerator_.reset(new V4L2VideoDecodeAccelerator(
268 gfx::GLSurfaceEGL::GetHardwareDisplay(), 269 gfx::GLSurfaceEGL::GetHardwareDisplay(),
269 stub_->decoder()->GetGLContext()->GetHandle(), 270 stub_->decoder()->GetGLContext()->GetHandle(),
270 weak_factory_for_io_.GetWeakPtr(), 271 weak_factory_for_io_.GetWeakPtr(),
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 return stub_->channel()->Send(message); 506 return stub_->channel()->Send(message);
506 } 507 }
507 508
508 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, 509 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message,
509 bool succeeded) { 510 bool succeeded) {
510 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); 511 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded);
511 Send(message); 512 Send(message);
512 } 513 }
513 514
514 } // namespace content 515 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/media/vt_video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698