Workaround DwmGetCompositionTimingInfo giving bad qpcRefreshPeriod
commit66c949d2f5478a20be46316c338174d5c3ad8735
authorbrucedawson <brucedawson@chromium.org>
Fri, 15 May 2015 00:07:42 +0000 (14 17:07 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 15 May 2015 00:07:48 +0000 (15 00:07 +0000)
tree8a3c8a3b3bf8f261ed35c26990b3269f4c2ad158
parentea92359618ea92a2d5700d9938c7a48de0c6de38
Workaround DwmGetCompositionTimingInfo giving bad qpcRefreshPeriod

On at least one machine Chrome hits a problem where DwmGetCompositionTimingInfo
says that qpcRefreshPeriod is 60. This implies a refresh rate of ~34,000 fps.
Chrome dutifully tries to hit this frame rate leading to excessive CPU usage.

This change adds a couple of checks to detect bad values and fix them. In
parallel this bug is being reported.

R=piman@chromium.org
BUG=486226

Review URL: https://codereview.chromium.org/1141013004

Cr-Commit-Position: refs/heads/master@{#329983}
ui/gl/gl_surface_win.cc