FazBrowse Wikipedia Viewer | Main Page |
Search Wikipedia:
|
Viewing: https://en.wikipedia.org/wiki/Graphics_Device_Interface

Graphics Device Interface

Contents
    Windows Vista
    Windows 7
GDI printers
Limitations
Successor
See also
Notes and references

The Graphics Device Interface in the architecture of Windows NT GDI as one of the backends in GDK

The Graphics Device Interface (GDI) is a legacy component of Microsoft Windows responsible for representing graphical objects and transmitting them to output devices such as monitors and printers. It was superseded by DirectDraw API and later Direct2D API.'s QuickDraw GX subsystem, and the open-source libart and cairo libraries.

Windows Vista

edit

In Windows Vista, all Windows applications including GDI and GDI+ applications run in the new compositing engine, Desktop Window Manager (DWM), which is GPU hardware-accelerated. As such, the GDI itself is no longer hardware-accelerated. Because of the nature of the composition operations, window moves can be faster or more responsive because the application does not need to re-render the underlying content.

Windows 7

edit

Windows 7 includes GDI hardware acceleration for blitting operations in the Windows Display Driver Model v1.1. This improves GDI performance and allows DWM to use local video memory for compositing, thereby reducing system memory footprint and increasing the performance of graphics operations. Most primitive GDI operations are still not hardware-accelerated, unlike Direct2D. GDI+ continues to rely on software rendering in Windows 7.

GDI printers

edit

A GDI printer or Winprinter (analogous to a Winmodem) is a printer designed to accept output from a host computer running Windows, which does all print processing: GDI renders a page as a bitmap, which the computer's printer driver receives, processes, and sends to the associated printer. Communication between the computer's GDI and driver, and the printer, is bidirectional; the printer tells the computer if it is ready to print or offline, out of paper, and so on.

A printer with its own control language can accept input from any device with a suitable driver, without requiring a PC running Windows. Such a printer requires hardware, firmware, and memory for the page rendering that the Windows host computer's GDI otherwise carries out. GDI printers can be made available to computers on a network if they are connected as shared printers on a computer running Windows. Some "generic" GDI drivers such as pnm2ppa have been written; they aim to make GDI printers compatible with non-Windows operating systems such as FreeBSD, but they cannot support all printers.

To allow simpler generation of drivers for Winprinters, Microsoft developed the Universal Printer Driver. This allows printer vendors to write Generic Printer Description (GPD) "minidrivers" which describe the printer's capabilities and command set in plaintext without requiring kernel mode programming.

Microsoft has moved away from the GDI printing model with Open XML Paper Specification.

Limitations

edit

Each window consumes GDI objects. As the complexity of the window increases, with additional features such as buttons and images, its GDI object usage also increases. When too many objects are in use, Windows is unable to draw any more GDI objects, leading to misbehaving software and frozen and unresponsive program operation. Many applications are also incorrectly coded and fail to release GDI objects after use, which further adds to the problem. The total available GDI objects varies from one version of Windows to the next: Windows 9x had a limit of 1,200 total objects; Windows 2000 has a limit of 16,384 objects; and Windows XP and later have a configurable limit (via the registry) that defaults to 10,000 objects per process (but a theoretical maximum of 65,536 for the entire session). Windows 8 and later increase the GDI object limit to 65,536 per user login session.

Earlier versions of Windows such as Windows 3.1 and Windows 98 included a Resource Meter program to allow the user to monitor how much of the total system GDI resources were in use. This resource meter consumed GDI objects itself. Later versions such as Windows 2000 and Windows XP can report GDI object usage for each program in the Task Manager, but they cannot tell the user the total GDI capacity available.

Overflowing GDI capacity can affect Windows itself, preventing new windows from opening, menus from displaying, and alert boxes from appearing. The situation can be difficult to clear and can potentially require a forced reset of the system, since it prevents core system programs from functioning. In Windows 8 and 8.1, a forced log-off occurs as a result of GDI capacity overflow, instead of a reboot.

Successor

edit

Direct2D is the successor of GDI and GDI+. Its sibling, DirectWrite, replaces Uniscribe. They were shipped with Windows 7 and Windows Server 2008 R2, and were available for Windows Vista and Windows Server 2008 (with Platform Update installed). Later, Microsoft developed Win2D, a free and open-source GDI-like class library. Win2D's target audience are developers that use C++, C#, and Visual Basic.NET to develop Universal Windows Platform apps.

See also

edit

Notes and references

edit
    Steven, White; David, Coulter; Mike, Jacobs (31 May 2018). "Comparing Direct2D and GDI Hardware Acceleration". Windows Developer. Microsoft.
  1. ↑ "Kernel Attacks through User-Mode Callbacks" (PDF). Archived from the original (PDF) on 2012-01-19.
  2. ↑ Platform SDK Redistributable: GDI+
  3. ↑ "Windows-only printers". Linux Documentation Project. Retrieved October 29, 2019.
  4. ↑ Microsoft Knowledgebase article 838283 - Desktop application menus are improperly displayed if a process exceeds its GDI object quota in Windows XP or in Windows 2000 http://support.microsoft.com/kb/838283
  5. ↑ Microsoft Developer Network Blog - GDI leak in Outlook 2007 causes problems when GDI usage reaches 10,000 objects https://blogs.msdn.com/rgregg/archive/2007/09/03/outlook-2007-gdi-leak-hotfix.aspx
  6. ↑ Microsoft Developer Network - GDI Object limits https://msdn.microsoft.com/en-us/library/ms724291(VS.85).aspx
  7. ↑ Microsoft Knowledge base Article 894500 - .NET programs designed on newer NT operating systems may malfunction on older Win 95 / Win 98 / Win ME due to lower GDI usage limits http://support.microsoft.com/kb/894500
  8. ↑  List
Microsoft APIs and frameworks
Graphics and UI
Audio
Multimedia
Web
Data access
Networking
Communication
Administration and
management
Component model
Libraries
Device drivers
Security
.NET
Software factories
IPC
Accessibility
Text and multilingual
support

View original on Wikipedia | Back | FazBrowse Home