The X Rendering Extension (Render or XRender) is an extension to the
X11 core protocol to implement
image compositing in the
X server, to allow an efficient display of transparent images.
History
It was written by
Keith Packard
Keith Packard (born April 16, 1963) is a software developer, best known for his work on the X Window System.
Packard is responsible for many X extensions and technical papers on X. He has been heavily involved in the development of X since the l ...
in 2000 and was first released with
XFree86
XFree86 is an implementation of the X Window System. It was originally written for Unix-like operating systems on IBM PC compatibles and was available for many other operating systems and platforms. It is free and open source software under the X ...
version 4.0.1. Its design was influenced by
rio
Rio or Río is the Portuguese, Spanish, Italian, and Maltese word for "river". When spoken on its own, the word often means Rio de Janeiro, a major city in Brazil.
Rio or Río may also refer to:
Geography Brazil
* Rio de Janeiro
* Rio do Sul, a ...
, the windowing system for
Plan 9.
Motivation
The core
X Window System
The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems.
X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting wit ...
drawing protocol does not have a way to efficiently draw transparent objects: A computer display is composed of individual
pixel
In digital imaging, a pixel (abbreviated px), pel, or picture element is the smallest addressable element in a raster image, or the smallest point in an all points addressable display device.
In most digital display devices, pixels are the smal ...
s, which can only show a single color at a time. Thus transparency can only be achieved by mixing the colors of the transparent object to be drawn with the background color (
alpha compositing
In computer graphics, alpha compositing or alpha blending is the process of combining one image with a background to create the appearance of partial or full transparency. It is often useful to render picture elements (pixels) in separate pas ...
). However, the standard X protocol only allows drawing with solid color, so the only way to achieve transparency is to fetch the background color from the screen, mix it with the object color, then write it back, which is fairly inefficient.
Xft - the X Font library
''Drawing anti-aliased text with the core protocol involves fetching pixels from the destination, merging in the glyphs and shipping them back. This can be a performance problem when the latency between client and server is high.''
Since many operations require transparency (for example spatial anti-aliasing
In digital signal processing, spatial anti-aliasing is a technique for minimizing the distortion artifacts (aliasing) when representing a high-resolution image at a lower resolution. Anti-aliasing is used in digital photography, computer graphics ...
, especially during font rasterization
Font rasterization is the process of converting text from a vector description (as found in scalable fonts such as TrueType fonts) to a raster or bitmap description. This often involves some anti-aliasing on screen text to make it smoother and ...
, and transparency effects in window manager
A window manager is system software that controls the placement and appearance of windows within a windowing system in a graphical user interface. Most window managers are designed to help provide a desktop environment. They work in conjunction ...
s, such as transparent windows or menus), this limitation caused problems, and Xrender was implemented to address it.
Features
It provides several rendering operations and also does alpha blending
In computer graphics, alpha compositing or alpha blending is the process of combining one image with a background to create the appearance of partial or full transparency. It is often useful to render picture elements (pixels) in separate pas ...
. it serves primarily to implement antialiased font
In metal typesetting, a font is a particular size, weight and style of a typeface. Each font is a matched set of type, with a piece (a "sort") for each glyph. A typeface consists of a range of such fonts that shared an overall design.
In mod ...
s, but for example KWin
KWin is a window manager for the X Window System and a Wayland compositor. It is released as a part of KDE Plasma 5, for which it is the default window manager. KWin can also be used on its own or with other desktop environments.
KWin can be c ...
, KDE’s window manager uses it to draw drop shadow
In graphic design and computer graphics, a drop shadow is a visual effect consisting of a drawing element which looks like the shadow of an object, giving the impression that the object is raised above the objects behind it. The drop shadow is of ...
s and translucency
In the field of optics, transparency (also called pellucidity or diaphaneity) is the physical property of allowing light to pass through the material without appreciable scattering of light. On a macroscopic scale (one in which the dimensions a ...
in case OpenGL
OpenGL (Open Graphics Library) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve hardwa ...
is not available.
Geometric figures are rendered by client-side tessellation into either triangle
A triangle is a polygon with three Edge (geometry), edges and three Vertex (geometry), vertices. It is one of the basic shapes in geometry. A triangle with vertices ''A'', ''B'', and ''C'' is denoted \triangle ABC.
In Euclidean geometry, an ...
s or trapezoid
A quadrilateral with at least one pair of parallel sides is called a trapezoid () in American and Canadian English. In British and other forms of English, it is called a trapezium ().
A trapezoid is necessarily a Convex polygon, convex quadri ...
s. Text is drawn by loading the glyph
A glyph () is any kind of purposeful mark. In typography, a glyph is "the specific shape, design, or representation of a character". It is a particular graphical representation, in a particular typeface, of an element of written language. A g ...
s into the server and rendering as a group.
It is designed to target the 3D graphics capabilities of newer video cards.
References
External links
The X Rendering Extension
(Keith Packard, Latest Official Specification)
The Xrender Library
(Keith Packard, USENIX 2000)
High Performance X Servers in the Kdrive Architecture
(Emma Anholt, USENIX '04)
X.Org Glossary
( X.Org)
{{XWinSys
Freedesktop.org
X Window extensions