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

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

Issue 10909112: Hacks to make HW decode work on linux via libva. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
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 <dlfcn.h> 5 #include <dlfcn.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 267
268 VaapiH264Decoder::DecodeSurface::~DecodeSurface() { 268 VaapiH264Decoder::DecodeSurface::~DecodeSurface() {
269 // Unbind surface from texture and deallocate resources. 269 // Unbind surface from texture and deallocate resources.
270 if (glx_pixmap_ && make_context_current_.Run()) { 270 if (glx_pixmap_ && make_context_current_.Run()) {
271 glXReleaseTexImageEXT(x_display_, glx_pixmap_, GLX_FRONT_LEFT_EXT); 271 glXReleaseTexImageEXT(x_display_, glx_pixmap_, GLX_FRONT_LEFT_EXT);
272 glXDestroyPixmap(x_display_, glx_pixmap_); 272 glXDestroyPixmap(x_display_, glx_pixmap_);
273 } 273 }
274 274
275 if (x_pixmap_) 275 if (x_pixmap_)
276 XFreePixmap(x_display_, x_pixmap_); 276 XFreePixmap(x_display_, x_pixmap_);
277 XSync(x_display_, False);
Ami GONE FROM CHROMIUM 2012/09/07 10:04:21 Without this, rendering_thread.Stop() in vdatest t
Pawel Osciak 2012/09/07 15:49:13 Could be a driver bug and/or us not being in corre
Ami GONE FROM CHROMIUM 2012/09/12 00:53:10 It must be, or else the failing opcode wouldn't be
277 } 278 }
278 279
279 void VaapiH264Decoder::DecodeSurface::Acquire(int32 input_id, int poc) { 280 void VaapiH264Decoder::DecodeSurface::Acquire(int32 input_id, int poc) {
280 DCHECK_EQ(available_, true); 281 DCHECK_EQ(available_, true);
281 available_ = false; 282 available_ = false;
282 input_id_ = input_id; 283 input_id_ = input_id;
283 poc_ = poc; 284 poc_ = poc;
284 } 285 }
285 286
286 void VaapiH264Decoder::DecodeSurface::Release() { 287 void VaapiH264Decoder::DecodeSurface::Release() {
(...skipping 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after
2283 VAAPI_SyncSurface && 2284 VAAPI_SyncSurface &&
2284 VAAPI_BeginPicture && 2285 VAAPI_BeginPicture &&
2285 VAAPI_RenderPicture && 2286 VAAPI_RenderPicture &&
2286 VAAPI_EndPicture && 2287 VAAPI_EndPicture &&
2287 VAAPI_CreateBuffer && 2288 VAAPI_CreateBuffer &&
2288 VAAPI_DestroyBuffer && 2289 VAAPI_DestroyBuffer &&
2289 VAAPI_ErrorStr; 2290 VAAPI_ErrorStr;
2290 } 2291 }
2291 2292
2292 } // namespace content 2293 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698