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

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

Issue 10843058: VAVDA: Destroy vaapi buffers after we're done drawing. (Closed) Base URL: https://git.chromium.org/git/chromium/src@master
Patch Set: Fix MakeCurrent Created 8 years, 4 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
« no previous file with comments | « no previous file | content/common/gpu/media/omx_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/logging.h" 10 #include "base/logging.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 NOTIMPLEMENTED() << "HW video decode acceleration not available."; 167 NOTIMPLEMENTED() << "HW video decode acceleration not available.";
168 NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE); 168 NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE);
169 return; 169 return;
170 } 170 }
171 DLOG(INFO) << "Initializing DXVA HW decoder for windows."; 171 DLOG(INFO) << "Initializing DXVA HW decoder for windows.";
172 video_decode_accelerator_.reset(new DXVAVideoDecodeAccelerator(this)); 172 video_decode_accelerator_.reset(new DXVAVideoDecodeAccelerator(this));
173 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) 173 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
174 video_decode_accelerator_.reset(new OmxVideoDecodeAccelerator( 174 video_decode_accelerator_.reset(new OmxVideoDecodeAccelerator(
175 gfx::GLSurfaceEGL::GetHardwareDisplay(), 175 gfx::GLSurfaceEGL::GetHardwareDisplay(),
176 stub_->decoder()->GetGLContext()->GetHandle(), 176 stub_->decoder()->GetGLContext()->GetHandle(),
177 this)); 177 this,
178 make_context_current_));
178 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) 179 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
179 gfx::GLContextGLX* glx_context = 180 gfx::GLContextGLX* glx_context =
180 static_cast<gfx::GLContextGLX*>(stub_->decoder()->GetGLContext()); 181 static_cast<gfx::GLContextGLX*>(stub_->decoder()->GetGLContext());
181 GLXContext glx_context_handle = 182 GLXContext glx_context_handle =
182 static_cast<GLXContext>(glx_context->GetHandle()); 183 static_cast<GLXContext>(glx_context->GetHandle());
183 video_decode_accelerator_.reset(new VaapiVideoDecodeAccelerator( 184 video_decode_accelerator_.reset(new VaapiVideoDecodeAccelerator(
184 glx_context->display(), glx_context_handle, this, 185 glx_context->display(), glx_context_handle, this,
185 make_context_current_)); 186 make_context_current_));
186 #elif defined(OS_MACOSX) 187 #elif defined(OS_MACOSX)
187 video_decode_accelerator_.reset(new MacVideoDecodeAccelerator( 188 video_decode_accelerator_.reset(new MacVideoDecodeAccelerator(
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 if (stub_) { 296 if (stub_) {
296 stub_->RemoveDestructionObserver(this); 297 stub_->RemoveDestructionObserver(this);
297 stub_.reset(); 298 stub_.reset();
298 } 299 }
299 } 300 }
300 301
301 bool GpuVideoDecodeAccelerator::Send(IPC::Message* message) { 302 bool GpuVideoDecodeAccelerator::Send(IPC::Message* message) {
302 DCHECK(sender_); 303 DCHECK(sender_);
303 return sender_->Send(message); 304 return sender_->Send(message);
304 } 305 }
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/media/omx_video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698