I can't seem to get a definite answer to this via searching. Are the Win32 blitting operations hardware accelerated (GDI, not GDI+). I don't know how these functions interface with the graphics driver. Is there any function call to verify this functionality, like ?GetCaps? for a specific graphics device (win32 graphics device) to see if these functions are receiving hardware acceleration?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
According to this, GDI is only hardware accelerated on windows 7 onwards.
This lists how to specify which operations are to be hardware accelerated. included in the list is BitBlt
and StretchBlt
, so yes they are hardware accelerated, but you need to have a system supporting it, and you need to enable it.
回答2:
If GDI operations are hardware accelerated depends on the driver but all versions of Windows except Vista* support it.
- Vista added a new driver model called Windows Display Driver Model (WDDM)
- WDDM v1.1 was added in Windows 7, this included the return of GDI hardware acceleration.
*: It is possible to use a XP driver on Vista, what happens to GDI in that setup I do not know. (Maybe you can detect this by checking for D3DCAPS2_CANSHARERESOURCE ?) Edit: According to this, it works with XPDM.
There are some kernel caps you could check on Win7 but I don't know if it is possible to check in usermode.