1 // Copyright 2018 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "components/viz/common/display/use_layered_window.h" 6 7 #include "ui/base/win/internal_constants.h" 8 9 namespace viz { 10 NeedsToUseLayerWindow(HWND hwnd)11bool NeedsToUseLayerWindow(HWND hwnd) { 12 // TODO(kylechar): Revisit if we can not use layered windows on Windows 8 and 13 // higher. With DWM enabled HWNDs seem to support an alpha channel natively. 14 // However, when touch highlight or pointer trails are enabled Windows ends up 15 // blending the highlight/trail with old content for non-layered HWNDs. See 16 // https://crbug.com/843974 for more details. 17 return GetProp(hwnd, ui::kWindowTranslucent); 18 } 19 20 } // namespace viz 21