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

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

Issue 10959021: Fix the test for failed eglQuerySurfacePointerANGLE in DXVA. (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
« no previous file with comments | « no previous file | no next file » | 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/dxva_video_decode_accelerator.h" 5 #include "content/common/gpu/media/dxva_video_decode_accelerator.h"
6 6
7 #if !defined(OS_WIN) 7 #if !defined(OS_WIN)
8 #error This file should only be built on Windows. 8 #error This file should only be built on Windows.
9 #endif // !defined(OS_WIN) 9 #endif // !defined(OS_WIN)
10 10
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 "Failed to create surface", 288 "Failed to create surface",
289 linked_ptr<DXVAPictureBuffer>(NULL)); 289 linked_ptr<DXVAPictureBuffer>(NULL));
290 290
291 HANDLE share_handle = NULL; 291 HANDLE share_handle = NULL;
292 EGLBoolean ret = eglQuerySurfacePointerANGLE( 292 EGLBoolean ret = eglQuerySurfacePointerANGLE(
293 static_cast<EGLDisplay*>(eglGetDisplay(EGL_DEFAULT_DISPLAY)), 293 static_cast<EGLDisplay*>(eglGetDisplay(EGL_DEFAULT_DISPLAY)),
294 picture_buffer->decoding_surface_, 294 picture_buffer->decoding_surface_,
295 EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE, 295 EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE,
296 &share_handle); 296 &share_handle);
297 297
298 RETURN_ON_FAILURE(share_handle || ret != EGL_TRUE, 298 RETURN_ON_FAILURE(share_handle && ret == EGL_TRUE,
299 "Failed to query ANGLE surface pointer", 299 "Failed to query ANGLE surface pointer",
300 linked_ptr<DXVAPictureBuffer>(NULL)); 300 linked_ptr<DXVAPictureBuffer>(NULL));
301 301
302 HRESULT hr = DXVAVideoDecodeAccelerator::device_->CreateTexture( 302 HRESULT hr = DXVAVideoDecodeAccelerator::device_->CreateTexture(
303 buffer.size().width(), 303 buffer.size().width(),
304 buffer.size().height(), 304 buffer.size().height(),
305 1, 305 1,
306 D3DUSAGE_RENDERTARGET, 306 D3DUSAGE_RENDERTARGET,
307 D3DFMT_X8R8G8B8, 307 D3DFMT_X8R8G8B8,
308 D3DPOOL_DEFAULT, 308 D3DPOOL_DEFAULT,
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 GL_TEXTURE_2D); 1071 GL_TEXTURE_2D);
1072 } 1072 }
1073 } 1073 }
1074 1074
1075 void DXVAVideoDecodeAccelerator::NotifyPictureReady( 1075 void DXVAVideoDecodeAccelerator::NotifyPictureReady(
1076 const media::Picture& picture) { 1076 const media::Picture& picture) {
1077 // This task could execute after the decoder has been torn down. 1077 // This task could execute after the decoder has been torn down.
1078 if (state_ != kUninitialized && client_) 1078 if (state_ != kUninitialized && client_)
1079 client_->PictureReady(picture); 1079 client_->PictureReady(picture);
1080 } 1080 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698