Currently, graphics consumers consume content from multiple rendering components and display it as part of a composition tree by rendering logical surfaces based on surface information generated by rendering components and communicated to the graphics consumer. A logical surface is an abstraction that describes the properties of a surface that are independent of its rastersizer specific properties. These properties can be size and dirty regions. Rastersizer specific properties are those that are needed to render the surface; such as: CPU or video memory surface, pixel format, or external handles used to get the pixels in the surface.
Graphics consumers are only able to process surface information that is generated according to one or more predefined graphics protocols. When a new graphics protocol is developed, changes must be made to the graphics consumer to allow for the processing of surface information generated in accordance with the new graphics protocol. Consequently, in order for the graphics consumer to remain compatible with new graphics protocols, updated versions of the graphics consumer must be created each time a new graphics protocol is released.
Methods, systems, and computer-readable media are provided for an extensible system that can support a variety of currently available and as-of-yet undeveloped graphics protocols without requiring modifications to be made to a graphics consumer. In one aspect of the invention, methods and computer-storage media for providing an interface between one or more logical surfaces and a graphics consumer are presented. The lifetime of graphics surfaces are tracked and associated to composition nodes in a composition tree in the graphics consumer. When rendering occurs to a graphics surface by their respective owning applications, the graphics consumer is notified.
In a second aspect, a system is provided that comprises a rendering component for generating graphics information and communication between the rendering component and a generic surface manager component. Rendering components communicate with the generic surface manager to obtain surface information and then render their content to the logical surfaces in accordance with a graphics protocol. The logical surfaces are then consumed by the graphics consumer and rendered as part of a composition tree.
In a third aspect, a method for providing an interface between one or more surfaces and a graphics consumer is provided. A rendering component generates surfaces and an identifier is assigned to each surface. The lifetime of the surfaces is tracked by the generic surface manager component and the surfaces are associated with composition nodes in a graphics consumer. The generic surface manager component monitors the surfaces generated by the rendering component and upon determining that the surfaces have been modified, notifies the graphics consumer accordingly.
This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Illustrative embodiments of the present invention are described in detail below with reference to the attached drawing figures, which are incorporated by reference herein and wherein:
Embodiments of the present invention may be embodied as, among other things: a method, system, or computer-program product. Accordingly, the embodiments may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware. In one embodiment, the present invention takes the form of a computer-program product that includes computer-useable instructions embodied on one or more computer-readable media.
Computer-readable media include both volatile and nonvolatile media, removable and nonremovable media, and contemplates media readable by a database, a switch, and various other network devices. By way of example, and not limitation, computer-readable media comprise media implemented in any method or technology for storing information. Examples of stored information include computer-useable instructions, data structures, program modules, and other data representations. Media examples include, but are not limited to information-delivery media, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile discs (DVD), holographic media or other optical disc storage, magnetic cassettes, magnetic tape, magnetic disk storage, and other magnetic storage devices. These technologies can store data momentarily, temporarily, or permanently.
Referring to the drawings in general, and initially to
The invention may be described in the general context of computer code or machine-useable instructions, including computer-executable instructions such as program components, being executed by a computer or other machine, such as a personal data assistant or other hand-held device. Generally, program components including routines, programs, objects, components, data structures, and the like, refer to code that performs particular tasks, or implements particular abstract data types. Embodiments of the present invention may be practiced in a variety of system configurations, including hand-held devices, consumer electronics, general-purpose computers, specialty-computing devices, and the like. Embodiments of the present invention may also be practiced in distributed computing environments where tasks are performed by remote-processing devices that are linked through a communications network.
With continued reference to
Computing device 100 typically includes a variety of computer-readable media. By way of example, and not limitation, computer-readable media may comprise Random Access Memory (RAM); Read Only Memory (ROM); Electronically Erasable Programmable Read Only Memory (EEPROM); flash memory or other memory technologies; CDROM, digital versatile disks (DVD) or other optical or holographic media; magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices; or any other medium that can be used to encode desired information and be accessed by computing device 100.
Memory 112 includes computer-storage media in the form of volatile and/or nonvolatile memory. The memory may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical-disk drives, and the like. Computing device 100 includes one or more processors that read data from various entities such as memory 112 or I/O components 120. Presentation component(s) 116 present data indications to a user or other device. Exemplary presentation components include a display device, speaker, printing component, vibrating component, etc. I/O ports 118 allow computing device 100 to be logically coupled to other devices including I/O components 120, some of which may be built in. Illustrative components include a microphone, joystick, game advertisement, satellite dish, scanner, printer, wireless device, and the like.
Turning now to
Rendering component 210 can be applications on computing device 100 that generate graphical output for display on render targets 240 and 250. Render targets 240 and 250 can be a logical space or memory allocated on the computing device 100 on which the rendering component 210 produces its graphical result. For example, render targets 240 and 250 can be a window in a user interface of the computing device 100. Rendering component 210 generate surface information and communicate with the generic surface manager component 220.
The graphical output generated by the rendering component 210 can be referred to as surface information or a graphics surface. The surface information can be generated by the rendering component 210 according to one or more graphics protocols. The graphics protocols can be DX or GDI, for example.
The generic surface manager component 220 receives the surface information, interchangeably referred to herein as a “surface,” generated by the rendering component 210, and assigns a unique identifier to the surface and associates it to a composition node in a composition tree on the graphics consumer component 230. The composition tree can have a plurality of composition nodes, with each of the nodes associated with a unique surface.
The generic surface manager component 220 tracks the lifetime of the surface by monitoring the surface to determine when it is created and destroyed. A notification is provided by the generic surface manager component 220 to graphics consumer component 230 when a particular surface is drawn to or modified by the rendering component 210. The notification can include the unique identifier assigned to the particular surface. The generic surface manager component 220 communicates with the rendering component 210 to obtain surface information and then render it onto logical surfaces in accordance with a graphics protocol
The graphics consumer component 230 can be a compositing desktop window manager (DWM), or other type of window manager that composes the surface information generated by the rendering component 210 into the render targets 240 and 250 on the desktop user interface on the computing device 100. As discussed above, the generic surface manager component 220 assigns the surface information generated by the rendering component 210 to a node in a composition tree on the graphics consumer component 230. Accordingly, surface information generated by different rendering components can be assigned to different nodes. Upon receiving the notification from the generic surface manager component 220 that a surface has been modified or drawn to, the graphics consumer component 230 then renders the composition tree and composes the surfaces generated by the one or more rendering components. In this manner, the graphics consumer component 230 composes the desktop user interface of the computing device 100 by composing surface information generated by one or more rendering components. The graphics consumer component 230 consumes logical surfaces and renders them as part of a composition tree.
The generic surface manager component 220 provides an extensible framework for supporting different types of graphics protocols employed by the rendering component 210 as specific graphics protocols are, therefore, effectively decoupled from the graphics consumer component 230.
With the introduction of a rendering component 210 that generates surface information according to a new or different graphics protocol, modifications need only be made to the generic surface manager component 220, and not to the graphics consumer component 230. For instance with the introduction of a rendering component 210 that generates surface information according to the DX 11 protocol, only the generic surface manager component 220 would need modification. The particular types of graphics protocols are, therefore, abstracted from the graphics consumer component 230.
With reference now to
The surface information 320 can be generated by the generic surface manager component 220, as depicted in relation to
Turning now to
As discussed in relation to
With reference now to
In block 520, the surfaces are associated to a composition node in a composition tree of the graphics consumer. The graphics consumer can be a graphics consumer component 230, such as a compositing desktop windows manager. The graphics consumer can compose the surfaces to generate the user interface on the computing device 100 by rendering the composition tree and associated composition nodes.
In block 530, the graphics consumer is notified when rendering occurs to the one or more surfaces by one or more owning applications. The generic surface manager component continually monitors the surface information generated by the rendering component, and, upon determining that a surface has been drawn to by rendering component 210, notifies the graphics consumer of the event. The graphics consumer can then render the composition tree to generate the user interface of the computing device 100.
Turning to
In block 620, identifiers are assigned to the each of the surfaces generated in block 610. The identifiers can be a unique string of characters that serves to identify the particular surface.
The lifetime of the surfaces are tracked in block 630. Tracking the lifetime of the surface can comprise monitoring the surface information output by the rendering component 210 to determine when a surface is created and/or destroyed.
In block 640, at least one of the surfaces is associated to at least one composition node in a graphics consumer. The graphics consumer is notified upon a determination that a surface or surfaces have been modified by the rendering component. The graphics consumer can be a graphics consumer component 230, such as a compositing desktop windows manager. The graphics consumer can compose the surfaces to generate the user interface on the computing device 100 by rendering the composition tree and associated composition nodes.
In block 650, the graphics consumer is notified upon the generic surface manager component 220 determining that the surfaces have been modified by the rendering component. The generic surface manager component continually monitors the surface information generated by the rendering component, and upon determining that a surface has been modified by a rendering component 210 notifies the graphics consumer of the event. An example of a modification of the surface by the rendering component 210 is a situation where the rendering component 210 draws to the surface. The graphics consumer can then render the composition tree to generate the user interface of the computing device 100.
Many different arrangements of the various components depicted, as well as components not shown, are possible without departing from the spirit and scope of the present invention. Embodiments of the present invention have been described with the intent to be illustrative rather than restrictive. Alternative embodiments will become apparent to those skilled in the art that do not depart from its scope. A skilled artisan may develop alternative means of implementing the aforementioned improvements without departing from the scope of the present invention.
It will be understood that certain features and subcombinations are of utility and may be employed without reference to other features and subcombinations and are contemplated within the scope of the claims. Not all steps listed in the various figures need be carried out in the specific order described.