diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-11 19:54:44 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-11 19:54:44 +0000 |
commit | 206c5b0f60cb328a34e964c4e5aaf788e2b084f4 (patch) | |
tree | ff9ba7a970e177aabbc4f93f23cd523fccff9ff2 /chrome/gpu | |
parent | ab80bac7428906fccfafbc4d620538ded23a2a83 (diff) | |
download | chromium_src-206c5b0f60cb328a34e964c4e5aaf788e2b084f4.zip chromium_src-206c5b0f60cb328a34e964c4e5aaf788e2b084f4.tar.gz chromium_src-206c5b0f60cb328a34e964c4e5aaf788e2b084f4.tar.bz2 |
In about:gpu, list only 2 levels of the tree.
This is where the interesting is. The rest is something about video deinterlacing. It also speeds it up a bit.
Also formatted vendor and device IDs as hex since that is how they are usually presented.
TEST=try
BUG=none
Review URL: http://codereview.chromium.org/3652001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62176 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/gpu')
-rw-r--r-- | chrome/gpu/gpu_dx_diagnostics_win.cc | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/chrome/gpu/gpu_dx_diagnostics_win.cc b/chrome/gpu/gpu_dx_diagnostics_win.cc index f6ee3c0..8c1960d 100644 --- a/chrome/gpu/gpu_dx_diagnostics_win.cc +++ b/chrome/gpu/gpu_dx_diagnostics_win.cc @@ -20,7 +20,8 @@ namespace { // structures that contains property name / value pairs and subtrees of DirectX // diagnostic information. void RecurseDiagnosticTree(DxDiagNode* output, - IDxDiagContainer* container) { + IDxDiagContainer* container, + int depth) { HRESULT hr; VARIANT variant; @@ -61,25 +62,27 @@ void RecurseDiagnosticTree(DxDiagNode* output, } } - DWORD child_count; - hr = container->GetNumberOfChildContainers(&child_count); - if (SUCCEEDED(hr)) { - for (DWORD i = 0; i < child_count; i++) { - WCHAR child_name16[256]; - hr = container->EnumChildContainerNames(i, - child_name16, - arraysize(child_name16)); - if (SUCCEEDED(hr)) { - std::string child_name8 = WideToUTF8(child_name16); - DxDiagNode* output_child = - &output->children[child_name8]; - - IDxDiagContainer* child_container = NULL; - hr = container->GetChildContainer(child_name16, &child_container); + if (depth > 0) { + DWORD child_count; + hr = container->GetNumberOfChildContainers(&child_count); + if (SUCCEEDED(hr)) { + for (DWORD i = 0; i < child_count; i++) { + WCHAR child_name16[256]; + hr = container->EnumChildContainerNames(i, + child_name16, + arraysize(child_name16)); if (SUCCEEDED(hr)) { - RecurseDiagnosticTree(output_child, child_container); + std::string child_name8 = WideToUTF8(child_name16); + DxDiagNode* output_child = + &output->children[child_name8]; + + IDxDiagContainer* child_container = NULL; + hr = container->GetChildContainer(child_name16, &child_container); + if (SUCCEEDED(hr)) { + RecurseDiagnosticTree(output_child, child_container, depth - 1); - child_container->Release(); + child_container->Release(); + } } } } @@ -116,7 +119,7 @@ bool GetDxDiagnostics(DxDiagNode* output) { hr = root->GetChildContainer(L"DxDiag_DisplayDevices", &display_devices); if (SUCCEEDED(hr)) { - RecurseDiagnosticTree(output, display_devices); + RecurseDiagnosticTree(output, display_devices, 1); success = true; display_devices->Release(); } |