2622c79d2d
* Makefile.am: Added rules for libgcjx library. * Makefile.in: Rebuilt. * configure.in: Added check for X. * configure: Rebuilt. * gnu/awt/LightweightRedirector.java: New file. * gnu/awt/j2d/AbstractGraphicsState.java: New file. * gnu/awt/j2d/DirectRasterGraphics.java: New file. * gnu/awt/j2d/Graphics2DImpl.java: New file. * gnu/awt/j2d/IntegerGraphicsState.java: New file. * gnu/awt/j2d/MappedRaster.java: New file. * gnu/awt/xlib/XCanvasPeer.java: New file. * gnu/awt/xlib/XEventLoop.java: New file. * gnu/awt/xlib/XEventQueue.java: New file. * gnu/awt/xlib/XFontMetrics.java: New file. * gnu/awt/xlib/XFramePeer.java: New file. * gnu/awt/xlib/XGraphics.java: New file. * gnu/awt/xlib/XGraphicsConfiguration.java: New file. * gnu/awt/xlib/XPanelPeer.java: New file. * gnu/awt/xlib/XToolkit.java: New file. * gnu/gcj/xlib/Clip.java: New file. * gnu/gcj/xlib/Colormap.java: New file. * gnu/gcj/xlib/Display.java: New file. * gnu/gcj/xlib/Drawable.java: New file. * gnu/gcj/xlib/Font.java: New file. * gnu/gcj/xlib/GC.java: New file. * gnu/gcj/xlib/Pixmap.java: New file. * gnu/gcj/xlib/Screen.java: New file. * gnu/gcj/xlib/Visual.java: New file. * gnu/gcj/xlib/WMSizeHints.java: New file. * gnu/gcj/xlib/Window.java: New file. * gnu/gcj/xlib/WindowAttributes.java: New file. * gnu/gcj/xlib/XAnyEvent.java: New file. * gnu/gcj/xlib/XButtonEvent.java: New file. * gnu/gcj/xlib/XColor.java: New file. * gnu/gcj/xlib/XConfigureEvent.java: New file. * gnu/gcj/xlib/XConnectException.java: New file. * gnu/gcj/xlib/XEvent.java: New file. * gnu/gcj/xlib/XException.java: New file. * gnu/gcj/xlib/XExposeEvent.java: New file. * gnu/gcj/xlib/XID.java: New file. * gnu/gcj/xlib/XImage.java: New file. * gnu/gcj/xlib/XUnmapEvent.java: New file. * gnu/gcj/xlib/natClip.cc: New file. * gnu/gcj/xlib/natColormap.cc: New file. * gnu/gcj/xlib/natDisplay.cc: New file. * gnu/gcj/xlib/natDrawable.cc: New file. * gnu/gcj/xlib/natFont.cc: New file. * gnu/gcj/xlib/natGC.cc: New file. * gnu/gcj/xlib/natPixmap.cc: New file. * gnu/gcj/xlib/natScreen.cc: New file. * gnu/gcj/xlib/natVisual.cc: New file. * gnu/gcj/xlib/natWMSizeHints.cc: New file. * gnu/gcj/xlib/natWindow.cc: New file. * gnu/gcj/xlib/natWindowAttributes.cc: New file. * gnu/gcj/xlib/natXAnyEvent.cc: New file. * gnu/gcj/xlib/natXButtonEvent.cc: New file. * gnu/gcj/xlib/natXColor.cc: New file. * gnu/gcj/xlib/natXConfigureEvent.cc: New file. * gnu/gcj/xlib/natXException.cc: New file. * gnu/gcj/xlib/natXExposeEvent.cc: New file. * gnu/gcj/xlib/natXImage.cc: New file. * gnu/gcj/xlib/natXUnmapEvent.cc: New file. * java/awt/EventDispatchThread.java: Start thead on creation. From-SVN: r37005
73 lines
2.9 KiB
Java
73 lines
2.9 KiB
Java
/* Copyright (C) 2000 Free Software Foundation
|
|
|
|
This file is part of libgcj.
|
|
|
|
This software is copyrighted work licensed under the terms of the
|
|
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
|
details. */
|
|
|
|
package gnu.awt.j2d;
|
|
|
|
import java.awt.image.WritableRaster;
|
|
import java.awt.image.ColorModel;
|
|
|
|
/* The raster and associated properties of a mapped screen region.
|
|
* The compositing capabilities of backends are often insufficient.
|
|
* The backend may not support alpha blending, or may not support some
|
|
* other special compositing rule. This means that compositing must
|
|
* sometimes be done within the rendering pipeline. The general
|
|
* compositing operation consists of combining new color and alpha
|
|
* values with existing color values on the drawing surface, to find
|
|
* the new color values for the drawing surface. The way the values
|
|
* are combined, determines what kind of compositing operation that is
|
|
* performed. The default compositing operation is alpha compositing.
|
|
*
|
|
* <p>In order to perform alpha compositing and other compositing
|
|
* operations, we need access to the color values of the imagery that
|
|
* has already been drawn on the drawing surface. The
|
|
* DirectRasterGraphics interface must therefore contain methods that
|
|
* makes it possible to gain access to the pixel values of the drawing
|
|
* surface. The methods are modeled after the POSIX mmap() and
|
|
* munmap() functions. But, instead of mapping and unmapping portions
|
|
* of data from a file descriptor to memory, the methods in
|
|
* DirectRasterGraphics maps and unmaps portions of the drawing
|
|
* surface to data arrays within writable raster objects. A call to
|
|
* mapRaster() will return a writable raster object, encapsulating the
|
|
* image data of the drawing surface in the requested domain. The data
|
|
* encapsulated by this raster object can be modified using the
|
|
* WritableRaster API, or the data buffers can be retrieved from the
|
|
* raster, so that the data arrays can be manipulated directly. When
|
|
* the raster image has been modified as desired, the data can be
|
|
* resynchronized with the drawing surface by calling mapRaster().
|
|
*
|
|
* <p>As with mmap() and munmap() the methods may work by direct
|
|
* manipulation of shared memory, (i.e. the raster object directly
|
|
* wraps the actual image data of the drawing surface), or may make a
|
|
* private copy that is resynched when the raster is unmapped. The
|
|
* backend may choose to implement either mechanism, and the pipeline
|
|
* code should not care what mechanism is actually used. This design
|
|
* allows us to make full use of speedups such as X shared memory
|
|
* extentions when available.
|
|
*/
|
|
public class MappedRaster
|
|
{
|
|
WritableRaster raster;
|
|
ColorModel cm;
|
|
|
|
public MappedRaster(WritableRaster raster, ColorModel cm)
|
|
{
|
|
this.raster = raster;
|
|
this.cm = cm;
|
|
}
|
|
|
|
public final WritableRaster getRaster()
|
|
{
|
|
return raster;
|
|
}
|
|
|
|
public final ColorModel getColorModel()
|
|
{
|
|
return cm;
|
|
}
|
|
}
|