Rendering translucent layers in a display system
AssigneeApple Computer, Inc.
InventorsRalph T. Brunner, Peter Graffagnino
Life of this patent
Estimating the term…
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.
Claims8
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.
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.
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.
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.
Dependencies are inferred from the claim text.