Commit 6e3b68c1 authored by Sunny Sachanandani's avatar Sunny Sachanandani Committed by Commit Bot

Deprecate GPU.DirectComposition.SwapBuffersLastError UMA

GetLastError returns the HRESULT of the last win32 API call and not the
last failed call so this UMA doesn't work as expected. Replace with
GPU.DirectComposition.SwapBuffersFailed boolean UMA that just counts
number of failures.

Bug: 837378
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Idee2ad507316823d31f95405e4431287f9aef5ee
Reviewed-on: https://chromium-review.googlesource.com/1072692
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
Reviewed-by: default avatarRobert Kaplow <rkaplow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564752}
parent fda6e861
...@@ -1502,10 +1502,8 @@ gfx::SwapResult DirectCompositionSurfaceWin::SwapBuffers( ...@@ -1502,10 +1502,8 @@ gfx::SwapResult DirectCompositionSurfaceWin::SwapBuffers(
if (!layer_tree_->CommitAndClearPendingOverlays()) if (!layer_tree_->CommitAndClearPendingOverlays())
scoped_swap_buffers.set_result(gfx::SwapResult::SWAP_FAILED); scoped_swap_buffers.set_result(gfx::SwapResult::SWAP_FAILED);
if (scoped_swap_buffers.result() == gfx::SwapResult::SWAP_FAILED) { if (scoped_swap_buffers.result() == gfx::SwapResult::SWAP_FAILED)
base::UmaHistogramSparse("GPU.DirectComposition.SwapBuffersLastError", UMA_HISTOGRAM_BOOLEAN("GPU.DirectComposition.SwapBuffersFailed", true);
::GetLastError());
}
return scoped_swap_buffers.result(); return scoped_swap_buffers.result();
} }
......
...@@ -31037,7 +31037,16 @@ uploading your change for review. ...@@ -31037,7 +31037,16 @@ uploading your change for review.
<summary>Whether or not a frame displays an overlay.</summary> <summary>Whether or not a frame displays an overlay.</summary>
</histogram> </histogram>
<histogram name="GPU.DirectComposition.SwapBuffersFailed" enum="BooleanHit">
<owner>sunnyps@chromium.org</owner>
<summary>Emitted on direct composition surface swap buffers failure.</summary>
</histogram>
<histogram name="GPU.DirectComposition.SwapBuffersLastError" enum="Hresult"> <histogram name="GPU.DirectComposition.SwapBuffersLastError" enum="Hresult">
<obsolete>
Deprecated 05/2018. GetLastError returns error for last successful or failed
win32 call so this doesn't work as expected.
</obsolete>
<owner>sunnyps@chromium.org</owner> <owner>sunnyps@chromium.org</owner>
<summary>Last error when presentation using DirectComposition fails.</summary> <summary>Last error when presentation using DirectComposition fails.</summary>
</histogram> </histogram>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment