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-by: Bruce Dawson <>
Reviewed-by: Sadrul Chowdhury <>
Commit-Queue: Cliff Smolinsky <>
Cr-Commit-Position: refs/heads/master@{#641819}
3 files changed