Commit 48f30deb authored by Sunny Sachanandani's avatar Sunny Sachanandani Committed by Commit Bot

Log DirectComposition swap buffers success and failure in UMA

Replace the GPU.DirectComposition.SwapBuffersFailed UMA which was being
emitted on failure only with SwapBuffersResult which is emitted on both
success and failure.

Bug: 869677
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: If950beb70d22f64997e7533751abcf9448d608db
Reviewed-on: https://chromium-review.googlesource.com/1187128
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586082}
parent aa163aa0
......@@ -1575,17 +1575,21 @@ gfx::SwapResult DirectCompositionSurfaceWin::SwapBuffers(
child_window_.ClearInvalidContents();
bool succeeded = true;
if (root_surface_->SwapBuffers(PresentationCallback()) ==
gfx::SwapResult::SWAP_FAILED)
scoped_swap_buffers.set_result(gfx::SwapResult::SWAP_FAILED);
succeeded = false;
if (!layer_tree_->CommitAndClearPendingOverlays())
scoped_swap_buffers.set_result(gfx::SwapResult::SWAP_FAILED);
succeeded = false;
if (scoped_swap_buffers.result() == gfx::SwapResult::SWAP_FAILED)
UMA_HISTOGRAM_BOOLEAN("GPU.DirectComposition.SwapBuffersFailed", true);
UMA_HISTOGRAM_BOOLEAN("GPU.DirectComposition.SwapBuffersResult", succeeded);
return scoped_swap_buffers.result();
auto swap_result =
succeeded ? gfx::SwapResult::SWAP_ACK : gfx::SwapResult::SWAP_FAILED;
scoped_swap_buffers.set_result(swap_result);
return swap_result;
}
gfx::SwapResult DirectCompositionSurfaceWin::PostSubBuffer(
......
......@@ -33682,6 +33682,10 @@ uploading your change for review.
</histogram>
<histogram name="GPU.DirectComposition.SwapBuffersFailed" enum="BooleanHit">
<obsolete>
Deprecated 08/2018. Replaced by SwapBuffersResult which is emitted on both
success and failure.
</obsolete>
<owner>sunnyps@chromium.org</owner>
<summary>Emitted on direct composition surface swap buffers failure.</summary>
</histogram>
......@@ -33695,6 +33699,11 @@ uploading your change for review.
<summary>Last error when presentation using DirectComposition fails.</summary>
</histogram>
<histogram name="GPU.DirectComposition.SwapBuffersResult" enum="BooleanSuccess">
<owner>sunnyps@chromium.org,zmo@chromium.org</owner>
<summary>Whether or not swap buffers succeeded.</summary>
</histogram>
<histogram name="GPU.DirectComposition.SwapchainFormat" enum="SwapchainFormat">
<owner>jbauman@chromium.org</owner>
<summary>What type of swapchain was actually created for an overlay.</summary>
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