#include "config.h"
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdarg.h>
#include "afterbase.h"
#include "asvisual.h"
#include "scanline.h"
Go to the source code of this file.
Defines | |
#define | LOCAL_DEBUG |
#define | ASV_ALLOC_COLOR(asv, cmap, pxcol) debug_AllocColor(__FILE__, __LINE__, (asv),(cmap),(pxcol)) |
#define | ENCODE_MSBF_565(r, gh3, gl3, b) (((gh3)&0x0007)|((gl3)&0xE000)|((r)&0x00F8)|((b)&0x1F00)) |
#define | ENCODE_LSBF_565(r, g, b) (((g)&0x07E0)|((r)&0xF800)|((b)&0x001F)) |
#define | ENCODE_MSBF_555(r, gh2, gl3, b) (((gh2)&0x0003)|((gl3)&0xE000)|((r)&0x007C)|((b)&0x1F00)) |
#define | ENCODE_LSBF_555(r, g, b) (((g)&0x03E0)|((r)&0x7C00)|((b)&0x001F)) |
Functions | |
static int | get_shifts (unsigned long mask) |
static int | get_bits (unsigned long mask) |
void | _XInitImageFuncPtrs (XImage *) |
int | asvisual_empty_XErrorHandler (Display *dpy, XErrorEvent *event) |
Status | debug_AllocColor (const char *file, int line, ASVisual *asv, Colormap cmap, XColor *pxcol) |
long | ARGB32_manhattan_distance (long a, long b) |
int | get_bits_per_pixel (Display *dpy, int depth) |
ASVisual * | _set_default_asvisual (ASVisual *new_v) |
static void | find_useable_visual (ASVisual *asv, Display *dpy, int screen, Window root, XVisualInfo *list, int nitems, XSetWindowAttributes *attr) |
Bool | query_screen_visual_id (ASVisual *asv, Display *dpy, int screen, Window root, int default_depth, VisualID visual_id, Colormap cmap) |
ASVisual * | create_asvisual_for_id (Display *dpy, int screen, int default_depth, VisualID visual_id, Colormap cmap, ASVisual *reusable_memory) |
ASVisual * | create_asvisual (Display *dpy, int screen, int default_depth, ASVisual *reusable_memory) |
void | destroy_asvisual (ASVisual *asv, Bool reusable) |
int | as_colormap_type2size (int type) |
Bool | visual2visual_prop (ASVisual *asv, size_t *size_ret, unsigned long *version_ret, unsigned long **data_ret) |
Bool | visual_prop2visual (ASVisual *asv, Display *dpy, int screen, size_t size, unsigned long version, unsigned long *data) |
Bool | setup_truecolor_visual (ASVisual *asv) |
ARGB32 * | make_reverse_colormap (unsigned long *cmap, size_t size, int depth, unsigned short mask, unsigned short shift) |
ASHashTable * | make_reverse_colorhash (unsigned long *cmap, size_t size, int depth, unsigned short mask, unsigned short shift) |
void | setup_pseudo_visual (ASVisual *asv) |
static unsigned long * | make_3bpp_colormap (ASVisual *asv) |
static unsigned long * | make_6bpp_colormap (ASVisual *asv, unsigned long *cmap_3bpp) |
static unsigned long * | make_9bpp_colormap (ASVisual *asv, unsigned long *cmap_6bpp) |
static unsigned long * | make_12bpp_colormap (ASVisual *asv, unsigned long *cmap_9bpp) |
void | setup_as_colormap (ASVisual *asv) |
Window | create_visual_window (ASVisual *asv, Window parent, int x, int y, unsigned int width, unsigned int height, unsigned int border_width, unsigned int wclass, unsigned long mask, XSetWindowAttributes *attributes) |
GC | create_visual_gc (ASVisual *asv, Window root, unsigned long mask, XGCValues *gcvalues) |
Pixmap | create_visual_pixmap (ASVisual *asv, Window root, unsigned int width, unsigned int height, unsigned int depth) |
void | destroy_visual_pixmap (ASVisual *asv, Pixmap *ppmap) |
static int | quiet_xerror_handler (Display *dpy, XErrorEvent *error) |
int | get_dpy_drawable_size (Display *drawable_dpy, Drawable d, unsigned int *ret_w, unsigned int *ret_h) |
Bool | get_dpy_window_position (Display *window_dpy, Window root, Window w, int *px, int *py, int *transparency_x, int *transparency_y) |
int | set_scratch_ximage_max_size (int new_max_size) |
int | set_scratch_ximage_normal_size (int new_normal_size) |
static void * | get_scratch_data (size_t size) |
static Bool | release_scratch_data (void *data) |
Bool | enable_shmem_images () |
void | disable_shmem_images () |
void * | check_XImage_shared (XImage *xim) |
Bool | ASPutXImage (ASVisual *asv, Drawable d, GC gc, XImage *xim, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height) |
XImage * | ASGetXImage (ASVisual *asv, Drawable d, int x, int y, unsigned int width, unsigned int height, unsigned long plane_mask) |
int | My_XDestroyImage (XImage *ximage) |
XImage * | create_visual_ximage (ASVisual *asv, unsigned int width, unsigned int height, unsigned int depth) |
XImage * | create_visual_scratch_ximage (ASVisual *asv, unsigned int width, unsigned int height, unsigned int depth) |
static void | query_pixel_color (ASVisual *asv, unsigned long pixel, CARD32 *r, CARD32 *g, CARD32 *b) |
CARD32 | color2pixel32bgr (ASVisual *asv, CARD32 encoded_color, unsigned long *pixel) |
CARD32 | color2pixel32rgb (ASVisual *asv, CARD32 encoded_color, unsigned long *pixel) |
CARD32 | color2pixel24bgr (ASVisual *asv, CARD32 encoded_color, unsigned long *pixel) |
CARD32 | color2pixel24rgb (ASVisual *asv, CARD32 encoded_color, unsigned long *pixel) |
CARD32 | color2pixel16bgr (ASVisual *asv, CARD32 encoded_color, unsigned long *pixel) |
CARD32 | color2pixel16rgb (ASVisual *asv, CARD32 encoded_color, unsigned long *pixel) |
CARD32 | color2pixel15bgr (ASVisual *asv, CARD32 encoded_color, unsigned long *pixel) |
CARD32 | color2pixel15rgb (ASVisual *asv, CARD32 encoded_color, unsigned long *pixel) |
CARD32 | color2pixel_pseudo3bpp (ASVisual *asv, CARD32 encoded_color, unsigned long *pixel) |
CARD32 | color2pixel_pseudo6bpp (ASVisual *asv, CARD32 encoded_color, unsigned long *pixel) |
CARD32 | color2pixel_pseudo12bpp (ASVisual *asv, CARD32 encoded_color, unsigned long *pixel) |
void | pixel2color32rgb (ASVisual *asv, unsigned long pixel, CARD32 *red, CARD32 *green, CARD32 *blue) |
void | pixel2color32bgr (ASVisual *asv, unsigned long pixel, CARD32 *red, CARD32 *green, CARD32 *blue) |
void | pixel2color24rgb (ASVisual *asv, unsigned long pixel, CARD32 *red, CARD32 *green, CARD32 *blue) |
void | pixel2color24bgr (ASVisual *asv, unsigned long pixel, CARD32 *red, CARD32 *green, CARD32 *blue) |
void | pixel2color16rgb (ASVisual *asv, unsigned long pixel, CARD32 *red, CARD32 *green, CARD32 *blue) |
void | pixel2color16bgr (ASVisual *asv, unsigned long pixel, CARD32 *red, CARD32 *green, CARD32 *blue) |
void | pixel2color15rgb (ASVisual *asv, unsigned long pixel, CARD32 *red, CARD32 *green, CARD32 *blue) |
void | pixel2color15bgr (ASVisual *asv, unsigned long pixel, CARD32 *red, CARD32 *green, CARD32 *blue) |
void | ximage2scanline32 (ASVisual *asv, XImage *xim, ASScanline *sl, int y, register unsigned char *xim_data) |
void | ximage2scanline16 (ASVisual *asv, XImage *xim, ASScanline *sl, int y, register unsigned char *xim_data) |
void | ximage2scanline15 (ASVisual *asv, XImage *xim, ASScanline *sl, int y, register unsigned char *xim_data) |
void | ximage2scanline_pseudo3bpp (ASVisual *asv, XImage *xim, ASScanline *sl, int y, register unsigned char *xim_data) |
void | ximage2scanline_pseudo6bpp (ASVisual *asv, XImage *xim, ASScanline *sl, int y, register unsigned char *xim_data) |
void | ximage2scanline_pseudo12bpp (ASVisual *asv, XImage *xim, ASScanline *sl, int y, register unsigned char *xim_data) |
void | scanline2ximage32 (ASVisual *asv, XImage *xim, ASScanline *sl, int y, register unsigned char *xim_data) |
void | scanline2ximage16 (ASVisual *asv, XImage *xim, ASScanline *sl, int y, register unsigned char *xim_data) |
void | scanline2ximage15 (ASVisual *asv, XImage *xim, ASScanline *sl, int y, register unsigned char *xim_data) |
void | scanline2ximage_pseudo3bpp (ASVisual *asv, XImage *xim, ASScanline *sl, int y, register unsigned char *xim_data) |
void | scanline2ximage_pseudo6bpp (ASVisual *asv, XImage *xim, ASScanline *sl, int y, register unsigned char *xim_data) |
void | scanline2ximage_pseudo12bpp (ASVisual *asv, XImage *xim, ASScanline *sl, int y, register unsigned char *xim_data) |
Variables | |
static XColor | black_xcol = { 0, 0x0000, 0x0000, 0x0000, DoRed|DoGreen|DoBlue } |
static XColor | white_xcol = { 0, 0xFFFF, 0xFFFF, 0xFFFF, DoRed|DoGreen|DoBlue } |
static unsigned char * | scratch_ximage_data = NULL |
static int | scratch_use_count = 0 |
static size_t | scratch_ximage_allocated_size = 0 |
static size_t | scratch_ximage_max_size = ASSHM_SAVED_MAX*2 |
static size_t | scratch_ximage_normal_size = ASSHM_SAVED_MAX |
#define ASV_ALLOC_COLOR | ( | asv, | |||
cmap, | |||||
pxcol | ) | debug_AllocColor(__FILE__, __LINE__, (asv),(cmap),(pxcol)) |
Definition at line 85 of file asvisual.c.
Referenced by find_useable_visual(), make_12bpp_colormap(), make_3bpp_colormap(), make_6bpp_colormap(), make_9bpp_colormap(), and query_screen_visual_id().
Referenced by scanline2ximage15().
Referenced by scanline2ximage16().
#define ENCODE_MSBF_555 | ( | r, | |||
gh2, | |||||
gl3, | |||||
b | ) | (((gh2)&0x0003)|((gl3)&0xE000)|((r)&0x007C)|((b)&0x1F00)) |
Referenced by scanline2ximage15().
#define ENCODE_MSBF_565 | ( | r, | |||
gh3, | |||||
gl3, | |||||
b | ) | (((gh3)&0x0007)|((gl3)&0xE000)|((r)&0x00F8)|((b)&0x1F00)) |
Referenced by scanline2ximage16().
#define LOCAL_DEBUG |
Definition at line 25 of file asvisual.c.
Definition at line 74 of file asimage.c.
References __as_default_asvisual, and __as_dummy_asvisual.
Referenced by create_asvisual_for_id(), and destroy_asvisual().
void _XInitImageFuncPtrs | ( | XImage * | ) |
Referenced by create_visual_scratch_ximage(), and create_visual_ximage().
Definition at line 97 of file asvisual.c.
References ARGB32_BLUE8, ARGB32_GREEN8, ARGB32_RED8, d, int, and t.
int as_colormap_type2size | ( | int | type | ) |
Definition at line 420 of file asvisual.c.
Referenced by setup_pseudo_visual(), visual2visual_prop(), and visual_prop2visual().
XImage* ASGetXImage | ( | ASVisual * | asv, | |
Drawable | d, | |||
int | x, | |||
int | y, | |||
unsigned int | width, | |||
unsigned int | height, | |||
unsigned long | plane_mask | |||
) |
Definition at line 1504 of file asvisual.c.
References ASVisual::dpy, None, and NULL.
Referenced by picture2asimage(), and pixmap2ximage().
Bool ASPutXImage | ( | ASVisual * | asv, | |
Drawable | d, | |||
GC | gc, | |||
XImage * | xim, | |||
int | src_x, | |||
int | src_y, | |||
int | dest_x, | |||
int | dest_y, | |||
unsigned int | width, | |||
unsigned int | height | |||
) |
Definition at line 1491 of file asvisual.c.
References ASVisual::dpy, False, and NULL.
Referenced by asimage2alpha(), and put_ximage().
int asvisual_empty_XErrorHandler | ( | Display * | dpy, | |
XErrorEvent * | event | |||
) |
void* check_XImage_shared | ( | XImage * | xim | ) |
Definition at line 1742 of file asvisual.c.
Definition at line 1747 of file asvisual.c.
Definition at line 1732 of file asvisual.c.
References ARGB32_BLUE8, ARGB32_GREEN8, and ARGB32_RED8.
Referenced by setup_truecolor_visual().
Definition at line 1791 of file asvisual.c.
References ASVisual::as_colormap, and c.
Referenced by setup_pseudo_visual().
Definition at line 1777 of file asvisual.c.
References ASVisual::as_colormap, and c.
Referenced by setup_pseudo_visual().
Definition at line 1784 of file asvisual.c.
References ASVisual::as_colormap, and c.
Referenced by setup_pseudo_visual().
ASVisual* create_asvisual | ( | Display * | dpy, | |
int | screen, | |||
int | default_depth, | |||
ASVisual * | reusable_memory | |||
) |
Definition at line 369 of file asvisual.c.
References ASVISUAL_ID_ENVVAR, create_asvisual_for_id(), getenv(), None, NULL, and strtol().
Referenced by TASImage::InitVisual(), and WinMain().
ASVisual* create_asvisual_for_id | ( | Display * | dpy, | |
int | screen, | |||
int | default_depth, | |||
VisualID | visual_id, | |||
Colormap | cmap, | |||
ASVisual * | reusable_memory | |||
) |
Definition at line 335 of file asvisual.c.
References _set_default_asvisual(), free(), None, NULL, query_screen_visual_id(), root, safecalloc, setup_as_colormap(), setup_pseudo_visual(), and setup_truecolor_visual().
Referenced by create_asvisual(), and TASImage::InitVisual().
Definition at line 980 of file asvisual.c.
References create_visual_window(), ASVisual::dpy, None, NULL, and ASVisual::scratch_window.
Pixmap create_visual_pixmap | ( | ASVisual * | asv, | |
Window | root, | |||
unsigned int | width, | |||
unsigned int | height, | |||
unsigned int | depth | |||
) |
Definition at line 998 of file asvisual.c.
References ASVisual::dpy, MAX, None, NULL, p, and ASVisual::true_depth.
Referenced by asimage2alpha(), asimage2pixmap(), fill_with_darkened_background(), and fill_with_pixmapped_background().
XImage* create_visual_scratch_ximage | ( | ASVisual * | asv, | |
unsigned int | width, | |||
unsigned int | height, | |||
unsigned int | depth | |||
) |
Definition at line 1618 of file asvisual.c.
References _XInitImageFuncPtrs(), create_visual_ximage(), data, ASVisual::dpy, get_scratch_data(), MAX, My_XDestroyImage(), NULL, ASVisual::true_depth, and unit.
Referenced by create_image_xim().
Window create_visual_window | ( | ASVisual * | asv, | |
Window | parent, | |||
int | x, | |||
int | y, | |||
unsigned int | width, | |||
unsigned int | height, | |||
unsigned int | border_width, | |||
unsigned int | wclass, | |||
unsigned long | mask, | |||
XSetWindowAttributes * | attributes | |||
) |
Definition at line 906 of file asvisual.c.
References ASVisual::black_pixel, clear_flags, ASVisual::colormap, depth, ASVisual::dpy, get_flags, INPUTONLY_LEGAL_MASK, LOCAL_DEBUG_OUT, None, NULL, set_flags, show_warning, and ASVisual::visual_info.
Referenced by create_visual_gc(), and cut_pixmap().
XImage* create_visual_ximage | ( | ASVisual * | asv, | |
unsigned int | width, | |||
unsigned int | height, | |||
unsigned int | depth | |||
) |
Definition at line 1535 of file asvisual.c.
References _XInitImageFuncPtrs(), data, ASVisual::dpy, False, free(), MAX, My_XDestroyImage(), NULL, safecalloc, safemalloc, show_error, show_warning, ASVisual::true_depth, unit, and ASVisual::visual_info.
Referenced by create_image_xim(), and create_visual_scratch_ximage().
Definition at line 382 of file asvisual.c.
References _set_default_asvisual(), ASVisual::as_colormap, ASVisual::as_colormap_reverse, ASVisual::as_colormap_type, ASVisual::colormap, destroy_ashash, ASVisual::dpy, free(), get_default_asvisual(), ASVisual::glx_scratch_gc_direct, ASVisual::glx_scratch_gc_indirect, glXDestroyContext(), ASVisual::hash, NULL, ASVisual::own_colormap, ASVisual::scratch_window, and ASVisual::xref.
Referenced by TASImage::InitVisual().
void destroy_visual_pixmap | ( | ASVisual * | asv, | |
Pixmap * | ppmap | |||
) |
void disable_shmem_images | ( | ) |
Definition at line 1488 of file asvisual.c.
Bool enable_shmem_images | ( | ) |
static void find_useable_visual | ( | ASVisual * | asv, | |
Display * | dpy, | |||
int | screen, | |||
Window | root, | |||
XVisualInfo * | list, | |||
int | nitems, | |||
XSetWindowAttributes * | attr | |||
) | [static] |
Definition at line 142 of file asvisual.c.
References ASV_ALLOC_COLOR, asvisual_empty_XErrorHandler(), ASVisual::black_pixel, black_xcol, ASVisual::colormap, depth, Display(), height, int, k, LOCAL_DEBUG_OUT, None, ASVisual::own_colormap, ASVisual::visual_info, w, ASVisual::white_pixel, white_xcol, and width.
Referenced by query_screen_visual_id().
static int get_bits | ( | unsigned long | mask | ) | [static] |
int get_bits_per_pixel | ( | Display * | dpy, | |
int | depth | |||
) |
int get_dpy_drawable_size | ( | Display * | drawable_dpy, | |
Drawable | d, | |||
unsigned int * | ret_w, | |||
unsigned int * | ret_h | |||
) |
Definition at line 1039 of file asvisual.c.
References Display(), int, None, NULL, quiet_xerror_handler(), result(), and root.
Referenced by get_dpy_window_position(), and handle_asxml_tag_img().
Bool get_dpy_window_position | ( | Display * | window_dpy, | |
Window | root, | |||
Window | w, | |||
int * | px, | |||
int * | py, | |||
int * | transparency_x, | |||
int * | transparency_y | |||
) |
Definition at line 1063 of file asvisual.c.
References False, get_dpy_drawable_size(), height, None, NULL, result(), width, x, and y.
Referenced by cut_win_pixmap(), CutWinPixmap(), and GetWinPosition().
static void* get_scratch_data | ( | size_t | size | ) | [static] |
Definition at line 1134 of file asvisual.c.
References NULL, realloc(), scratch_use_count, scratch_ximage_allocated_size, and scratch_ximage_data.
Referenced by create_visual_scratch_ximage().
static int get_shifts | ( | unsigned long | mask | ) | [static] |
Definition at line 825 of file asvisual.c.
References ASV_ALLOC_COLOR, ASVisual::black_pixel, blue, ASVisual::colormap, green, red, and safemalloc.
Referenced by setup_as_colormap().
Definition at line 713 of file asvisual.c.
References ASV_ALLOC_COLOR, ASVisual::black_pixel, ASVisual::colormap, safemalloc, and ASVisual::white_pixel.
Referenced by setup_as_colormap().
Definition at line 746 of file asvisual.c.
References ASV_ALLOC_COLOR, ASVisual::black_pixel, blue, ASVisual::colormap, green, red, and safemalloc.
Referenced by setup_as_colormap().
Definition at line 786 of file asvisual.c.
References ASV_ALLOC_COLOR, ASVisual::black_pixel, blue, ASVisual::colormap, green, red, and safemalloc.
Referenced by setup_as_colormap().
ASHashTable* make_reverse_colorhash | ( | unsigned long * | cmap, | |
size_t | size, | |||
int | depth, | |||
unsigned short | mask, | |||
unsigned short | shift | |||
) |
Definition at line 637 of file asvisual.c.
References add_hash_item, create_ashash, hash, i, MAKE_ARGB32, and NULL.
Referenced by setup_as_colormap(), and setup_pseudo_visual().
ARGB32* make_reverse_colormap | ( | unsigned long * | cmap, | |
size_t | size, | |||
int | depth, | |||
unsigned short | mask, | |||
unsigned short | shift | |||
) |
Definition at line 624 of file asvisual.c.
References i, int, MAKE_ARGB32, and safecalloc.
Referenced by setup_as_colormap(), and setup_pseudo_visual().
int My_XDestroyImage | ( | XImage * | ximage | ) |
Definition at line 1521 of file asvisual.c.
References free(), NULL, and release_scratch_data().
Referenced by create_visual_scratch_ximage(), and create_visual_ximage().
void pixel2color24bgr | ( | ASVisual * | asv, | |
unsigned long | pixel, | |||
CARD32 * | red, | |||
CARD32 * | green, | |||
CARD32 * | blue | |||
) |
Definition at line 1804 of file asvisual.c.
void pixel2color24rgb | ( | ASVisual * | asv, | |
unsigned long | pixel, | |||
CARD32 * | red, | |||
CARD32 * | green, | |||
CARD32 * | blue | |||
) |
Definition at line 1802 of file asvisual.c.
static void query_pixel_color | ( | ASVisual * | asv, | |
unsigned long | pixel, | |||
CARD32 * | r, | |||
CARD32 * | g, | |||
CARD32 * | b | |||
) | [inline, static] |
Definition at line 1717 of file asvisual.c.
References ASVisual::colormap, and ASVisual::dpy.
Referenced by ximage2scanline_pseudo12bpp(), ximage2scanline_pseudo3bpp(), and ximage2scanline_pseudo6bpp().
Bool query_screen_visual_id | ( | ASVisual * | asv, | |
Display * | dpy, | |||
int | screen, | |||
Window | root, | |||
int | default_depth, | |||
VisualID | visual_id, | |||
Colormap | cmap | |||
) |
Definition at line 199 of file asvisual.c.
References ARGB32_Black, ARGB32_White, ASV_ALLOC_COLOR, ASVisual::black_pixel, black_xcol, ASVisual::colormap, ASVisual::dpy, False, find_useable_visual(), fprintf(), get_output_threshold, i, list, mask, MSBFirst, NULL, OUTPUT_VERBOSE_THRESHOLD, ASVisual::own_colormap, show_error, True, ASVisual::visual_info, ASVisual::white_pixel, and white_xcol.
Referenced by create_asvisual_for_id().
static int quiet_xerror_handler | ( | Display * | dpy, | |
XErrorEvent * | error | |||
) | [static] |
static Bool release_scratch_data | ( | void * | data | ) | [static] |
Definition at line 1149 of file asvisual.c.
References False, scratch_use_count, scratch_ximage_data, and True.
Referenced by My_XDestroyImage().
void scanline2ximage15 | ( | ASVisual * | asv, | |
XImage * | xim, | |||
ASScanline * | sl, | |||
int | y, | |||
register unsigned char * | xim_data | |||
) |
Definition at line 2099 of file asvisual.c.
References b, c, ENCODE_LSBF_555, ENCODE_MSBF_555, g, i, MIN, ASVisual::msb_first, ASScanline::offset_x, ASScanline::width, ASScanline::xc1, ASScanline::xc2, and ASScanline::xc3.
Referenced by encode_image_scanline_xim(), and setup_truecolor_visual().
void scanline2ximage16 | ( | ASVisual * | asv, | |
XImage * | xim, | |||
ASScanline * | sl, | |||
int | y, | |||
register unsigned char * | xim_data | |||
) |
Definition at line 2041 of file asvisual.c.
References b, c, ENCODE_LSBF_565, ENCODE_MSBF_565, g, i, MIN, ASVisual::msb_first, ASScanline::offset_x, ASScanline::width, ASScanline::xc1, ASScanline::xc2, and ASScanline::xc3.
Referenced by encode_image_scanline_xim(), and setup_truecolor_visual().
void scanline2ximage32 | ( | ASVisual * | asv, | |
XImage * | xim, | |||
ASScanline * | sl, | |||
int | y, | |||
register unsigned char * | xim_data | |||
) |
Definition at line 2010 of file asvisual.c.
References a, ASScanline::alpha, b, g, i, MIN, ASVisual::msb_first, ASScanline::offset_x, ASScanline::width, ASScanline::xc1, ASScanline::xc2, and ASScanline::xc3.
Referenced by encode_image_scanline_xim(), and setup_truecolor_visual().
void scanline2ximage_pseudo12bpp | ( | ASVisual * | asv, | |
XImage * | xim, | |||
ASScanline * | sl, | |||
int | y, | |||
register unsigned char * | xim_data | |||
) |
Definition at line 2245 of file asvisual.c.
References ASVisual::as_colormap, b, c, g, i, MIN, ASScanline::offset_x, ASScanline::width, ASScanline::xc1, ASScanline::xc2, and ASScanline::xc3.
Referenced by setup_pseudo_visual().
void scanline2ximage_pseudo3bpp | ( | ASVisual * | asv, | |
XImage * | xim, | |||
ASScanline * | sl, | |||
int | y, | |||
register unsigned char * | xim_data | |||
) |
Definition at line 2161 of file asvisual.c.
References ASVisual::as_colormap, b, c, g, i, MIN, ASScanline::offset_x, ASScanline::width, ASScanline::xc1, ASScanline::xc2, and ASScanline::xc3.
Referenced by setup_pseudo_visual().
void scanline2ximage_pseudo6bpp | ( | ASVisual * | asv, | |
XImage * | xim, | |||
ASScanline * | sl, | |||
int | y, | |||
register unsigned char * | xim_data | |||
) |
Definition at line 2190 of file asvisual.c.
References ASVisual::as_colormap, b, c, g, i, MIN, ASScanline::offset_x, ASScanline::width, ASScanline::xc1, ASScanline::xc2, and ASScanline::xc3.
Referenced by setup_pseudo_visual().
int set_scratch_ximage_max_size | ( | int | new_max_size | ) |
int set_scratch_ximage_normal_size | ( | int | new_normal_size | ) |
void setup_as_colormap | ( | ASVisual * | asv | ) |
Definition at line 865 of file asvisual.c.
References ASVisual::as_colormap, ASVisual::as_colormap_reverse, ASVisual::as_colormap_type, free(), ASVisual::hash, make_12bpp_colormap(), make_3bpp_colormap(), make_6bpp_colormap(), make_9bpp_colormap(), make_reverse_colorhash(), make_reverse_colormap(), NULL, ASVisual::true_depth, and ASVisual::xref.
Referenced by create_asvisual_for_id().
void setup_pseudo_visual | ( | ASVisual * | asv | ) |
Definition at line 651 of file asvisual.c.
References ASVisual::as_colormap, ASVisual::as_colormap_reverse, ASVisual::as_colormap_type, as_colormap_type2size(), ASVisual::color2pixel_func, color2pixel_pseudo12bpp(), color2pixel_pseudo3bpp(), color2pixel_pseudo6bpp(), ASVisual::hash, make_reverse_colorhash(), make_reverse_colormap(), mask, NULL, ASVisual::scanline2ximage_func, scanline2ximage_pseudo12bpp(), scanline2ximage_pseudo3bpp(), scanline2ximage_pseudo6bpp(), ASVisual::true_depth, ASVisual::visual_info, ASVisual::ximage2scanline_func, ximage2scanline_pseudo12bpp(), ximage2scanline_pseudo3bpp(), ximage2scanline_pseudo6bpp(), and ASVisual::xref.
Referenced by create_asvisual_for_id().
Definition at line 537 of file asvisual.c.
References ASGLX_Available, ASGLX_DoubleBuffer, ASGLX_RGBA, ASGLX_UseForImageTx, ASVisual::bbits, ASVisual::BGR_mode, ASVisual::bshift, color2pixel15bgr(), color2pixel15rgb(), color2pixel16bgr(), color2pixel16rgb(), color2pixel32bgr(), color2pixel32rgb(), ASVisual::color2pixel_func, ASVisual::dpy, False, ASVisual::gbits, get_bits(), get_shifts(), GLX_DOUBLEBUFFER, GLX_RGBA, ASVisual::glx_scratch_gc_direct, ASVisual::glx_scratch_gc_indirect, ASVisual::glx_support, GLX_USE_GL, glXCreateContext(), glXDestroyContext(), glXGetConfig(), glXIsDirect(), glXQueryExtension(), ASVisual::gshift, ASVisual::msb_first, MSBFirst, NULL, pixel2color15bgr(), pixel2color15rgb(), pixel2color16bgr(), pixel2color16rgb(), pixel2color32bgr(), pixel2color32rgb(), ASVisual::pixel2color_func, ASVisual::rbits, ASVisual::rshift, scanline2ximage15(), scanline2ximage16(), scanline2ximage32(), ASVisual::scanline2ximage_func, set_flags, True, ASVisual::true_depth, val, ASVisual::visual_info, ximage2scanline15(), ximage2scanline16(), ximage2scanline32(), and ASVisual::ximage2scanline_func.
Referenced by create_asvisual_for_id().
Bool visual2visual_prop | ( | ASVisual * | asv, | |
size_t * | size_ret, | |||
unsigned long * | version_ret, | |||
unsigned long ** | data_ret | |||
) |
Definition at line 436 of file asvisual.c.
References ASVisual::as_colormap, ASVisual::as_colormap_type, as_colormap_type2size(), ASVisual::black_pixel, ASVisual::colormap, False, i, NULL, safemalloc, size, size_t, True, ASVisual::visual_info, and ASVisual::white_pixel.
Bool visual_prop2visual | ( | ASVisual * | asv, | |
Display * | dpy, | |||
int | screen, | |||
size_t | size, | |||
unsigned long | version, | |||
unsigned long * | data | |||
) |
Definition at line 475 of file asvisual.c.
References ASVisual::as_colormap, ASVisual::as_colormap_type, as_colormap_type2size(), ASVisual::black_pixel, ASVisual::colormap, ASVisual::dpy, False, free(), i, list, None, NULL, ASVisual::own_colormap, safemalloc, True, ASVisual::visual_info, and ASVisual::white_pixel.
void ximage2scanline15 | ( | ASVisual * | asv, | |
XImage * | xim, | |||
ASScanline * | sl, | |||
int | y, | |||
register unsigned char * | xim_data | |||
) |
Definition at line 1878 of file asvisual.c.
References b, g, i, MIN, ASVisual::msb_first, ASScanline::offset_x, ASScanline::width, ASScanline::xc1, ASScanline::xc2, and ASScanline::xc3.
Referenced by setup_truecolor_visual().
void ximage2scanline16 | ( | ASVisual * | asv, | |
XImage * | xim, | |||
ASScanline * | sl, | |||
int | y, | |||
register unsigned char * | xim_data | |||
) |
Definition at line 1851 of file asvisual.c.
References b, g, i, MIN, ASVisual::msb_first, ASScanline::offset_x, ASScanline::width, ASScanline::xc1, ASScanline::xc2, and ASScanline::xc3.
Referenced by setup_truecolor_visual().
void ximage2scanline32 | ( | ASVisual * | asv, | |
XImage * | xim, | |||
ASScanline * | sl, | |||
int | y, | |||
register unsigned char * | xim_data | |||
) |
Definition at line 1815 of file asvisual.c.
References a, ASScanline::alpha, b, g, i, MIN, ASVisual::msb_first, ASScanline::offset_x, ASScanline::width, ASScanline::xc1, ASScanline::xc2, and ASScanline::xc3.
Referenced by setup_truecolor_visual().
void ximage2scanline_pseudo12bpp | ( | ASVisual * | asv, | |
XImage * | xim, | |||
ASScanline * | sl, | |||
int | y, | |||
register unsigned char * | xim_data | |||
) |
Definition at line 1968 of file asvisual.c.
References ARGB32_BLUE8, ARGB32_GREEN8, ARGB32_RED8, ASVisual::as_colormap_reverse, AS_HASHABLE, ASH_Success, b, c, ASHashData::c32, g, get_hash_item, ASVisual::hash, i, MIN, ASScanline::offset_x, query_pixel_color(), ASHashData::vptr, ASScanline::width, ASScanline::xc1, ASScanline::xc2, and ASScanline::xc3.
Referenced by setup_pseudo_visual().
void ximage2scanline_pseudo3bpp | ( | ASVisual * | asv, | |
XImage * | xim, | |||
ASScanline * | sl, | |||
int | y, | |||
register unsigned char * | xim_data | |||
) |
Definition at line 1908 of file asvisual.c.
References ARGB32_BLUE8, ARGB32_GREEN8, ARGB32_RED8, ASVisual::as_colormap_reverse, b, c, g, i, MIN, ASScanline::offset_x, query_pixel_color(), ASScanline::width, ASScanline::xc1, ASScanline::xc2, ASScanline::xc3, and ASVisual::xref.
Referenced by setup_pseudo_visual().
void ximage2scanline_pseudo6bpp | ( | ASVisual * | asv, | |
XImage * | xim, | |||
ASScanline * | sl, | |||
int | y, | |||
register unsigned char * | xim_data | |||
) |
Definition at line 1930 of file asvisual.c.
References ARGB32_BLUE8, ARGB32_GREEN8, ARGB32_RED8, ASVisual::as_colormap_reverse, b, c, g, i, MIN, ASScanline::offset_x, query_pixel_color(), ASScanline::width, ASScanline::xc1, ASScanline::xc2, ASScanline::xc3, and ASVisual::xref.
Referenced by setup_pseudo_visual().
XColor black_xcol = { 0, 0x0000, 0x0000, 0x0000, DoRed|DoGreen|DoBlue } [static] |
Definition at line 139 of file asvisual.c.
Referenced by find_useable_visual(), TGX11::FindUsableVisual(), and query_screen_visual_id().
int scratch_use_count = 0 [static] |
Definition at line 1110 of file asvisual.c.
Referenced by get_scratch_data(), and release_scratch_data().
size_t scratch_ximage_allocated_size = 0 [static] |
unsigned char* scratch_ximage_data = NULL [static] |
Definition at line 1109 of file asvisual.c.
Referenced by get_scratch_data(), and release_scratch_data().
size_t scratch_ximage_max_size = ASSHM_SAVED_MAX*2 [static] |
size_t scratch_ximage_normal_size = ASSHM_SAVED_MAX [static] |
XColor white_xcol = { 0, 0xFFFF, 0xFFFF, 0xFFFF, DoRed|DoGreen|DoBlue } [static] |
Definition at line 140 of file asvisual.c.
Referenced by find_useable_visual(), TGX11::FindUsableVisual(), and query_screen_visual_id().