Hardware accelerated mode breaks BitBlt
Reported by
b4s...@gmail.com,
Aug 1 2016
|
|||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36
Steps to reproduce the problem:
1.
Using the following Code the Captureing only works with Hardware Acceleration disabled:
public static Image CaptureWindow(IntPtr handle)
{
IntPtr hdcSrc = User32.GetWindowDC(handle);
Rect windowRect = new Rect();
User32.GetWindowRect(handle, ref windowRect);
int width = windowRect.Right - windowRect.Left;
int height = windowRect.Bottom - windowRect.Top;
IntPtr hdcDest = Gdi32.CreateCompatibleDC(hdcSrc);
IntPtr hBitmap = Gdi32.CreateCompatibleBitmap(hdcSrc, width, height);
IntPtr hOld = Gdi32.SelectObject(hdcDest, hBitmap);
Gdi32.BitBlt(hdcDest, 0, 0, width, height, hdcSrc, 0, 0, SRCCOPY);
Gdi32.SelectObject(hdcDest, hOld);
Gdi32.DeleteDC(hdcDest);
User32.ReleaseDC(handle, hdcSrc);
Image image = Image.FromHbitmap(hBitmap);
Gdi32.DeleteObject(hBitmap);
return image;
}
Source: http://stackoverflow.com/questions/38139903/bitblt-not-capturing-windows-in-hardware-accelerated-mode
What is the expected behavior?
What went wrong?
With HW-Acceleration it returns a transparent image
Did this work before? N/A
Chrome version: 52.0.2743.82 Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 22.0 r0
,
Aug 2 2016
,
Aug 2 2016
What do you mean by "sample testcase for a repro" A binary that showcases this bug? btw. im new to bugreporting :)
,
Aug 3 2016
It would be appreciable if you can provide us with a sample HTML file so that we can investigate this from test team end.
,
Aug 5 2016
,
Aug 5 2016
I'm guessing there's nothing we can do about this, the problem maybe being related to the device the reporter is trying to use as the src for the bitblt operation. Hopefully someone in GPU land can answer definitively. This doesn't need a bisect. There's no indication that it's a regression.
,
Aug 5 2016
And b4stor@, how are you getting the "handle" you pass into the code above?
,
Aug 5 2016
I use the window Handle (Class:"Chrome_WidgetWin_1") I dont use any special device or something. It is weird because the Tabs and favbar etc. all is transparent (i mean all pixels have 0x00000000) and that should not involve hardware acceleration i think. @tkonch i cant demonstrat it with an html file... i can make a example program but not right now maybe couple of days
,
Aug 13 2016
Thank you for providing more feedback. Adding requester "tkonchada@chromium.org" for another review and adding "Needs-Review" label for tracking. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 24 2016
As per comment #8 TE is waiting for the example program. No action required from my end and hence removing myself as owner.
,
Mar 3 2017
Closing given that we don't have an example program that we can use to try to reproduce this. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by ligim...@chromium.org
, Aug 1 2016