Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are the GDI functions BitBlt and StretchBlt hardware accelerated in Win32?

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?

like image 259
oldSkool Avatar asked Feb 19 '12 07:02

oldSkool


People also ask

Is GDI hardware acceleration?

GDI is hardware accelerated on Windows XP, and accelerated on Windows 7 when the Desktop Window Manager is running and a WDDM 1.1 driver is in use. Direct2D is hardware accelerated on almost any WDDM driver and whether or not DWM is in use. On Vista, GDI will always render on the CPU.

Is GDI GPU accelerated?

The GDI Hardware Acceleration feature introduced with Windows 7 provides accelerated core graphics device interface (GDI) operations on a graphics processing unit (GPU).


2 Answers

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.

like image 62
Necrolis Avatar answered Sep 30 '22 18:09

Necrolis


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.

like image 33
Anders Avatar answered Sep 30 '22 18:09

Anders