Fix the retrieval of DwmIsCompositionEnabled.

Calling DwmIsCompositionEnabled has a non-neglible perf impact so on
Win8+ we just return true since the API is guaranteed to return true.
In addition, the code didn't properly check the return value of the
call and therefore it could have accessed uninitialized memory, so
this change adds an important SUCCEEDED call when the API is called.

Bug: 942258,942165
Change-Id: I21f75ad1e756f0f5b92e7c35f69b5ba07595e5ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1525441
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Cliff Smolinsky <cliffsmo@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#641819}
3 files changed