Rendering translucent layers in a display system
First Claim
1. A computer-implemented method for combining at least two overlapping layers to render an image, the image containing a plurality of image pixels, each overlapping layer containing a plurality of layer pixels, each layer pixel corresponding to one of the image pixels, the method comprising:
- a) for at least one image pixel;
a.1) initializing an accumulator color value;
a.2) selecting a topmost remaining overlapping layer having a layer pixel corresponding to the image pixel, the layer pixel having a color value;
a.3) compositing the color value of the layer pixel with the accumulator color value;
a.4) storing the result of a.3) in the accumulator;
a.5) determining whether layer pixels for any remaining overlapping layers should be processed;
a.6)responsive to a.5) indicating that layer pixels for any remaining overlapping layers should be processed, repeating a.2) to a.6);
a.7) retrieving a tag indicating a topmost changed layer;
a.8) determining whether a.2) has been performed for the indicated topmost changed layer; and
a.9) responsive to a.2) having been performed for the indicated topmost changed layer, outputting the accumulator color value.
2 Assignments
0 Petitions
Accused Products
Abstract
A system and method of rendering overlapping layers in a computer display, such as a windowing system, employs front-to-back assembly of the displayed image. An arbitrary number of overlapping elements, such as windows, can be presented, without requiring temporary storage space or additional off-screen buffers. The front-to-back assembly technique minimizes the number of memory transfers performed in connection with rendering an image, and avoids unnecessary reading and processing of pixels that will not contribute to the final image. Special effects such as semi-transparency, shadows, and irregular shapes can be accommodated and processed in an efficient manner.
251 Citations
8 Claims
-
1. A computer-implemented method for combining at least two overlapping layers to render an image, the image containing a plurality of image pixels, each overlapping layer containing a plurality of layer pixels, each layer pixel corresponding to one of the image pixels, the method comprising:
-
a) for at least one image pixel;
a.1) initializing an accumulator color value;
a.2) selecting a topmost remaining overlapping layer having a layer pixel corresponding to the image pixel, the layer pixel having a color value;
a.3) compositing the color value of the layer pixel with the accumulator color value;
a.4) storing the result of a.3) in the accumulator;
a.5) determining whether layer pixels for any remaining overlapping layers should be processed;
a.6)responsive to a.5) indicating that layer pixels for any remaining overlapping layers should be processed, repeating a.2) to a.6);
a.7) retrieving a tag indicating a topmost changed layer;
a.8) determining whether a.2) has been performed for the indicated topmost changed layer; and
a.9) responsive to a.2) having been performed for the indicated topmost changed layer, outputting the accumulator color value. - View Dependent Claims (2)
a.1) further comprises initializing an accumulator opacity value;
a.3) further comprises compositing the opacity value of the layer pixel with the accumulator opacity value; and
a.5) comprises determining whether the accumulator opacity value indicates full opacity.
-
-
3. A system for combining at least two overlapping layers to render an image, the image containing a plurality of image pixels, each overlapping layer containing a plurality of layer pixels, each layer pixel corresponding to one of the image pixels, the system comprising:
-
an accumulator, for initializing an accumulator color value for at least one image pixel;
a layer selector, for successively selecting each of at least a subset of the overlapping layers having a layer pixel corresponding to the image pixel, the layer pixel having a color value;
a compositor coupled to the layer selector and to the accumulator, for, for each successively selected layer, compositing the color value of the layer pixel with the accumulator color value and storing the result in the accumulator;
a tag processing module, coupled to the layer selector, for retrieving a tag indicating a topmost changed layer and for determining whether the layer selector has operated on the indicated topmost changed layer; and
an output device, coupled to the accumulator, for responsive to the tag processing module indicating that the layer selector has operated on the indicated topmost changed layer, outputting the accumulator color value. - View Dependent Claims (4)
the accumulator further initializes an accumulator opacity value;
the compositor further composites the opacity value of the layer pixel with the accumulator opacity value and stores the result in the accumulator; and
the subset of overlapping layers selected by the layer selector is determined responsive to a comparison of the accumulator opacity value with a full opacity value.
-
-
5. A computer program product comprising a computer-usable medium having computer-readable code embodied therein for combining at least two overlapping layers to render an image, the image containing a plurality of image pixels, each overlapping layer containing a plurality of layer pixels, each layer pixel corresponding to one of the image pixels, the computer program product comprising:
-
computer-readable program code devices configured to cause a computer to, for at least one image pixel;
initialize an accumulator color value;
select a topmost remaining overlapping layer having a layer pixel corresponding to the image pixel, the layer pixel having a color value;
composite the color value of the layer pixel with the accumulator color value;
store the result of the compositing in the accumulator;
determine whether layer pixels for any remaining overlapping layers should be processed;
responsive to the determination indicating that layer pixels for any remaining overlapping layers should be processed, repeat the initializing, selecting, compositing, storing, and determining steps;
retrieve a tag indicating a topmost changed layer;
determine whether the selection has been performed for the indicated topmost changed layer; and
responsive to the selection having been performed for the indicated topmost changed layer, output the accumulator color value. - View Dependent Claims (6)
the computer-readable program code devices configured to cause a computer to initialize an accumulator color value further comprise computer-readable program code devices configured to cause a computer to initialize an accumulator opacity value;
the computer-readable program code devices configured to cause a computer to composite the color value of the layer pixel with the accumulator color value further comprise computer-readable program code devices configured to cause a computer to composite the opacity value of the layer pixel with the accumulator opacity value; and
the computer-readable program code devices configured to cause a computer to determine whether the selection has been performed for the indicated topmost changed layer comprise computer-readable program code devices configured to cause a computer to determine whether the accumulator opacity value indicates full opacity.
-
-
7. A system for combining at least two overlapping layers to render an image, the image containing a plurality of image pixels, each overlapping layer containing a plurality of layer pixels, each layer pixel corresponding to one of the image pixels, the system comprising:
-
accumulating means, for initializing an accumulator color value for at least one image pixel;
layer selecting means, for successively selecting each of at least a subset of the overlapping layers having a layer pixel corresponding to the image pixel, the layer pixel having a color value;
compositing means coupled to the layer selecting means and to the accumulating means, for, for each successively selected layer, compositing the color value of the layer pixel with the accumulator color value and storing the result in the accumulating means;
tag processing means, coupled to the layer selecting means, for retrieving a tag indicating a topmost changed layer and for determining whether the layer selecting means has operated on the indicated topmost changed layer; and
output means, coupled to the accumulating means, for responsive to the tag processing means indicating that the layer selecting has operated on the indicated topmost changed layer, outputting the accumulator color value. - View Dependent Claims (8)
the accumulating means further initializes an accumulator opacity value;
the compositing means further composites the opacity value of the layer pixel with the accumulator opacity value and stores the result in the accumulating means; and
the subset of overlapping layers selected by the layer selecting means is determined responsive to a comparison of the accumulator opacity value with a full opacity value.
-
Specification