Index: content/browser/compositor/software_output_device_win.cc |
diff --git a/content/browser/compositor/software_output_device_win.cc b/content/browser/compositor/software_output_device_win.cc |
index 4cb2d876d847a429a32d02b71699b06780237303..274717603d55f69e9362b41b97c1326b955d4d17 100644 |
--- a/content/browser/compositor/software_output_device_win.cc |
+++ b/content/browser/compositor/software_output_device_win.cc |
@@ -13,6 +13,7 @@ |
#include "ui/compositor/compositor.h" |
#include "ui/gfx/gdi_util.h" |
#include "ui/gfx/skia_util.h" |
+#include "ui/gfx/win/constants.h" |
namespace content { |
@@ -93,8 +94,7 @@ SoftwareOutputDeviceWin::SoftwareOutputDeviceWin(OutputDeviceBacking* backing, |
in_paint_(false) { |
DCHECK_CURRENTLY_ON(BrowserThread::UI); |
- LONG style = GetWindowLong(hwnd_, GWL_EXSTYLE); |
- is_hwnd_composited_ = !!(style & WS_EX_COMPOSITED); |
+ is_hwnd_composited_ = !!::GetProp(hwnd_, gfx::kChromeWindowTranslucent); |
// Layered windows must be completely updated every time, so they can't |
// share contents with other windows. |
if (is_hwnd_composited_) |
@@ -177,7 +177,7 @@ void SoftwareOutputDeviceWin::EndPaint() { |
BLENDFUNCTION blend = {AC_SRC_OVER, 0x00, 0xFF, AC_SRC_ALPHA}; |
DWORD style = GetWindowLong(hwnd_, GWL_EXSTYLE); |
- style &= ~WS_EX_COMPOSITED; |
+ DCHECK(!(style & WS_EX_COMPOSITED)); |
style |= WS_EX_LAYERED; |
SetWindowLong(hwnd_, GWL_EXSTYLE, style); |