Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1543028
  • 博文数量: 596
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 173
  • 用 户 组: 普通用户
  • 注册时间: 2016-07-06 15:50
个人简介

在线笔记

文章分类

全部博文(596)

文章存档

2016年(1)

2015年(104)

2014年(228)

2013年(226)

2012年(26)

2011年(11)

分类: Windows平台

2014-04-15 15:11:48


  1. GDI/Driver Division of Labor
  2. To understand graphics driver design, it is important to understand the roles of GDI and the driver, and how they negotiate. GDI, with its enhanced capabilities, can handle many operations that previously required a graphics driver. GDI also has the responsibility of managing data structures critical to graphics operations, such as surfaces, although each graphics driver must have access to them.
  3. (为了理解图形驱动的设计,就需要理解GDI和驱动的角色以及交互过程。GDI,拥有增强的能力集可以处理多种操作,这些操作以前需要驱动完成。

  1. GDI Communication with the Driver

  2. The driver exports only one function to GDI: DrvEnableDriver. All other driver-supported functions, including the DrvDisableDriver function, are exposed to GDI through an array of pointers. A GDI call to DrvEnableDriver initializes the driver and passes back the list of driver-supported graphics DDI functions. While there are some functions a driver must support, GDI will handle those operations not included in the function list received from the driver
  3. 驱动只导出一个接口给GDI:DrvEnableDriver。其他所有驱动支持的函数,包括DrvDisableDriver函数,都是通过结构体制作传递给GDI。GDI调用DrvEnableDriver初始化驱动,并返回一个驱动支持的DDI函数列表。

  1. %28v=vs.85%29.aspx
  2. GDI User Objects

  3. GDI maintains important internal data structures, but gives the driver access to the public fields of these structures by passing them down as user objects. User objects are intermediate data structures that provide an interface between GDI data structures and the drivers that need access to the information within these structures. The driver can pass the pointer to a user object back to GDI to query for information or to ask for various services. User objects with public fields provide the following advantages:
  4. (GDI管理重要的内部数据结构,以user objects的形式将public字段传递给driver。user objects用于GDI和驱动交互信息。驱动通过user objects向GDI查询信息或获取服务。)

  5.     They eliminate problems associated with direct access to internal GDI data structures.

  6.     They provide a place to hold GDI data for the driver. For example, a PATHOBJ structure can hold all the extra data required to enumerate a complex object like a path.

  7. The following user objects are available:
  8. Object    Description

  9. BRUSHOBJ
  10.     

  11. Defines the brush objects for graphic functions that output lines, text, or fills. Drivers can call BRUSHOBJ services to realize brushes or to find realizations previously cached by GDI.

  12. CLIPOBJ
  13.     

  14. Provides the driver with access to a clip region for drawing or filling. This region can be enumerated as a series of rectangles.

  15. FLOATOBJ
  16.     

  17. Allows graphics drivers to emulate floating-point operations. Floating-point operations are disabled for all other kernel-mode drivers.

  18. FONTOBJ
  19.     

  20. Gives the driver access to information about a particular instance (or realization) of a font.

  21. PALOBJ
  22.     

  23. A structure containing RGB palette colors; accessible via the PALOBJ_cGetColors and DrvSetPalette functions. The PALOBJ structure contains no public members.

  24. PATHOBJ
  25.     

  26. Defines a path that specifies what is to be drawn (lines or Bezier curves). A PATHOBJ structure is passed to the driver to describe a set of lines and Bezier curves that are to be stroked or filled.

  27. STROBJ
  28.     

  29. Enumerates for the driver a list of glyph handles and positions that describe how a text string is to be drawn.

  30. SURFOBJ
  31.     

  32. Identifies a surface, which can be a GDI bitmap, a device-dependent bitmap, or a device-managed surface. See Surface Types for more information.

  33. XFORMOBJ
  34.     

  35. Describes an arbitrary linear two-dimensional transform, such as for geometric wide lines.

  36. XLATEOBJ
  37.     

  38. Defines the translations needed to convert pixels from the source surface format to the destination surface format.

  1. GDI Service Routines

  2. GDI exports many service routines, whose names have the form EngXxx. The driver dynamically links to win32k.sys to directly access these routines. GDI service routines include surface management, rendering simulations, and path, palette, font, and text services. These services are discussed in detail in GDI Support Services.
  3. (GDI导出服务接口,已EngXxx命名。驱动可以动态链接到win32k.sys去直接获得该接口。GDI服务包括表面管理,渲染模拟,以及路径,画刷,字体,文字服务。




阅读(852) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~