Reduce 3d Engine Work for Steady State Video Playback
When DirectCompositionChildSurfaceWin::EnqueuePendingFrame is called if swap_rect_ is non-empty a d3d11 query is created resulting in 3d engine work. Due to an optimization in DirectRenderer::DrawFrame (see https://source.chromium.org/chromium/chromium/src/+/master:components/v iz/service/display/direct_renderer.cc;drc=be67975e bd6cf67bbe1;l=402) we are not however currently clearing swap_rect_ by calling DirectCompositionChildSurfaceWin::SetDrawRectangle with an empty rect when there is no damage to the root. As a result after the first SetDrawRectangle call 3d engine work is performed for each queued frame. To help reduce the amount of 3d engine work we'll reset swap_rect_ at the end of SwapBuffers; allowing the d3d11 query to be skipped until the next new SetDrawRectangle occurs. Bug: 1133916 Change-Id: I84ccf81d18a8e45e1ce871484a763c20e5bb6418 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2443489 Commit-Queue: William Carr <wicarr@microsoft.com> Reviewed-by:Sunny Sachanandani <sunnyps@chromium.org> Cr-Commit-Position: refs/heads/master@{#812886}
Showing
Please register or sign in to comment