| OLD | NEW |
| 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 EGLBoolean ret = eglQuerySurfacePointerANGLE( | 291 EGLBoolean ret = eglQuerySurfacePointerANGLE( |
| 292 egl_display, | 292 egl_display, |
| 293 picture_buffer->decoding_surface_, | 293 picture_buffer->decoding_surface_, |
| 294 EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE, | 294 EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE, |
| 295 &share_handle); | 295 &share_handle); |
| 296 | 296 |
| 297 RETURN_ON_FAILURE(share_handle && ret == EGL_TRUE, | 297 RETURN_ON_FAILURE(share_handle && ret == EGL_TRUE, |
| 298 "Failed to query ANGLE surface pointer", | 298 "Failed to query ANGLE surface pointer", |
| 299 linked_ptr<DXVAPictureBuffer>(NULL)); | 299 linked_ptr<DXVAPictureBuffer>(NULL)); |
| 300 | 300 |
| 301 // FIXME: after moving to D3D11, use RGBA surface. crbug.com/438691 |
| 301 HRESULT hr = decoder.device_->CreateTexture( | 302 HRESULT hr = decoder.device_->CreateTexture( |
| 302 buffer.size().width(), | 303 buffer.size().width(), |
| 303 buffer.size().height(), | 304 buffer.size().height(), |
| 304 1, | 305 1, |
| 305 D3DUSAGE_RENDERTARGET, | 306 D3DUSAGE_RENDERTARGET, |
| 306 use_rgb ? D3DFMT_X8R8G8B8 : D3DFMT_A8R8G8B8, | 307 use_rgb ? D3DFMT_X8R8G8B8 : D3DFMT_A8R8G8B8, |
| 307 D3DPOOL_DEFAULT, | 308 D3DPOOL_DEFAULT, |
| 308 picture_buffer->decoding_texture_.Receive(), | 309 picture_buffer->decoding_texture_.Receive(), |
| 309 &share_handle); | 310 &share_handle); |
| 310 | 311 |
| (...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1360 int32 picture_buffer_id) { | 1361 int32 picture_buffer_id) { |
| 1361 OutputBuffers::iterator it = stale_output_picture_buffers_.find( | 1362 OutputBuffers::iterator it = stale_output_picture_buffers_.find( |
| 1362 picture_buffer_id); | 1363 picture_buffer_id); |
| 1363 DCHECK(it != stale_output_picture_buffers_.end()); | 1364 DCHECK(it != stale_output_picture_buffers_.end()); |
| 1364 DVLOG(1) << "Dismissing picture id: " << it->second->id(); | 1365 DVLOG(1) << "Dismissing picture id: " << it->second->id(); |
| 1365 client_->DismissPictureBuffer(it->second->id()); | 1366 client_->DismissPictureBuffer(it->second->id()); |
| 1366 stale_output_picture_buffers_.erase(it); | 1367 stale_output_picture_buffers_.erase(it); |
| 1367 } | 1368 } |
| 1368 | 1369 |
| 1369 } // namespace content | 1370 } // namespace content |
| OLD | NEW |