-
kylechar authored
This CL adds a SoftwareOutputDevice implementation for Windows software compositing to a layered window. The layered window API is required to support transparency when DWM is disabled. Calling UpdateLayeredWindow() is also blocked by the GPU sandbox. To work around this SoftwareOutputDeviceWinProxy in the GPU process draws into a shared memory buffer and sends an IPC to the browser process. LayeredWindowUpdaterImpl receives the IPC and calls UpdateLayeredWindow(). Having the browser process draw into an HWND with pixels produced in the GPU process shouldn't be a security issue. The GPU process can already draw into the HWND via other APIs. Drawing is clipped to the HWND size. It's not ideal having to send an IPC from the GPU to browser process for each draw. However, layered windows are the only way for an HWND to guarantee it supports transparency on Windows 7. Having a child window in the GPU process is not possible as layered windows are incompatible with child windows for Windows 7. HWNDs with transparent backgrounds are used infrequently and don't update quickly so this should hopefully be performant enough. This code is also only used for Windows 7. Bug: 826633 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel Change-Id: I3b2d749b75aed7789b19b3e8dfd7d0371ef6fe73 Reviewed-on: https://chromium-review.googlesource.com/1042283 Commit-Queue: kylechar <kylechar@chromium.org> Reviewed-by:
Tom Sepez <tsepez@chromium.org> Reviewed-by:
Nico Weber <thakis@chromium.org> Reviewed-by:
Antoine Labour <piman@chromium.org> Cr-Commit-Position: refs/heads/master@{#558462}
ba2f0e59