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

Unified Diff: content/common/gpu/media/dxva_video_decode_accelerator_win.cc

Issue 1884133004: Attempt to fix a hang in the GPU process while creating a D3D9 device. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/dxva_video_decode_accelerator_win.cc
diff --git a/content/common/gpu/media/dxva_video_decode_accelerator_win.cc b/content/common/gpu/media/dxva_video_decode_accelerator_win.cc
index 111193febecfbf29f4fbf526194d60bf95dc2c4f..b4ee8f0b682e59b2309eac1898e05a2b30f5146c 100644
--- a/content/common/gpu/media/dxva_video_decode_accelerator_win.cc
+++ b/content/common/gpu/media/dxva_video_decode_accelerator_win.cc
@@ -1036,6 +1036,13 @@ bool DXVAVideoDecodeAccelerator::CreateD3DDevManager() {
hr = Direct3DCreate9Ex(D3D_SDK_VERSION, d3d9_.Receive());
RETURN_ON_HR_FAILURE(hr, "Direct3DCreate9Ex failed", false);
+ hr = d3d9_->CheckDeviceFormatConversion(
+ D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,
+ static_cast<D3DFORMAT>(MAKEFOURCC('N', 'V', '1', '2')),
+ D3DFMT_X8R8G8B8);
+ RETURN_ON_HR_FAILURE(hr,
+ "D3D9 driver does not support H/W format conversion", false);
+
base::win::ScopedComPtr<IDirect3DDevice9> angle_device =
QueryDeviceObjectFromANGLE<IDirect3DDevice9>(EGL_D3D9_DEVICE_ANGLE);
if (angle_device.get())
@@ -1063,8 +1070,7 @@ bool DXVAVideoDecodeAccelerator::CreateD3DDevManager() {
D3DDEVTYPE_HAL,
NULL,
D3DCREATE_FPU_PRESERVE |
- D3DCREATE_HARDWARE_VERTEXPROCESSING |
- D3DCREATE_DISABLE_PSGP_THREADING |
+ D3DCREATE_MIXED_VERTEXPROCESSING |
D3DCREATE_MULTITHREADED,
&present_params,
NULL,
« 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