summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/xlib/xm_api.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-10-31 15:13:29 -0600
committerBrian <[email protected]>2007-10-31 15:13:29 -0600
commite5ff772523e73dcc8b79270d680a8de1a7bad7bc (patch)
tree3bc722082f382097d234521b2dbc2edd0a48446b /src/mesa/pipe/xlib/xm_api.c
parent017d08a5e040ee476b19d672c17090eaca7fa918 (diff)
remove HPCR support
Diffstat (limited to 'src/mesa/pipe/xlib/xm_api.c')
-rw-r--r--src/mesa/pipe/xlib/xm_api.c146
1 files changed, 0 insertions, 146 deletions
diff --git a/src/mesa/pipe/xlib/xm_api.c b/src/mesa/pipe/xlib/xm_api.c
index 3beb9033c94..74246ddbe3d 100644
--- a/src/mesa/pipe/xlib/xm_api.c
+++ b/src/mesa/pipe/xlib/xm_api.c
@@ -88,68 +88,6 @@ _glthread_Mutex _xmesa_lock;
-/**
- * Lookup tables for HPCR pixel format:
- */
-static short hpcr_rgbTbl[3][256] = {
-{
- 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23,
- 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31,
- 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 37, 38, 38, 39, 39,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
-112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
-128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
-144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
-160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
-176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
-192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
-208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
-224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239
-},
-{
- 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23,
- 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31,
- 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 37, 38, 38, 39, 39,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
-112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
-128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
-144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
-160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
-176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
-192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
-208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
-224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239
-},
-{
- 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 37, 38, 38, 39, 39,
- 40, 40, 41, 41, 42, 42, 43, 43, 44, 44, 45, 45, 46, 46, 47, 47,
- 48, 48, 49, 49, 50, 50, 51, 51, 52, 52, 53, 53, 54, 54, 55, 55,
- 56, 56, 57, 57, 58, 58, 59, 59, 60, 60, 61, 61, 62, 62, 63, 63,
- 64, 64, 65, 65, 66, 66, 67, 67, 68, 68, 69, 69, 70, 70, 71, 71,
- 72, 72, 73, 73, 74, 74, 75, 75, 76, 76, 77, 77, 78, 78, 79, 79,
- 80, 80, 81, 81, 82, 82, 83, 83, 84, 84, 85, 85, 86, 86, 87, 87,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
-112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
-128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
-144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
-160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
-176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
-192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
-208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223
-}
-};
-
-
-
/**********************************************************************/
/***** X Utility Functions *****/
/**********************************************************************/
@@ -859,62 +797,6 @@ setup_dithered_color(int client, XMesaVisual v,
/**
- * Setup for Hewlett Packard Color Recovery 8-bit TrueColor mode.
- * HPCR simulates 24-bit color fidelity with an 8-bit frame buffer.
- * Special dithering tables have to be initialized.
- */
-static void
-setup_8bit_hpcr(XMesaVisual v)
-{
- /* HP Color Recovery contributed by: Alex De Bruyn ([email protected])
- * To work properly, the atom _HP_RGB_SMOOTH_MAP_LIST must be defined
- * on the root window AND the colormap obtainable by XGetRGBColormaps
- * for that atom must be set on the window. (see also tkInitWindow)
- * If that colormap is not set, the output will look stripy.
- */
-
- /* Setup color tables with gamma correction */
- int i;
- double g;
-
- g = 1.0 / v->RedGamma;
- for (i=0; i<256; i++) {
- GLint red = IROUND_POS(255.0 * _mesa_pow( hpcr_rgbTbl[0][i]/255.0, g ));
- v->hpcr_rgbTbl[0][i] = CLAMP( red, 16, 239 );
- }
-
- g = 1.0 / v->GreenGamma;
- for (i=0; i<256; i++) {
- GLint green = IROUND_POS(255.0 * _mesa_pow( hpcr_rgbTbl[1][i]/255.0, g ));
- v->hpcr_rgbTbl[1][i] = CLAMP( green, 16, 239 );
- }
-
- g = 1.0 / v->BlueGamma;
- for (i=0; i<256; i++) {
- GLint blue = IROUND_POS(255.0 * _mesa_pow( hpcr_rgbTbl[2][i]/255.0, g ));
- v->hpcr_rgbTbl[2][i] = CLAMP( blue, 32, 223 );
- }
- v->undithered_pf = PF_HPCR; /* can't really disable dithering for now */
- v->dithered_pf = PF_HPCR;
-
- /* which method should I use to clear */
- /* GL_FALSE: keep the ordinary method */
- /* GL_TRUE : clear with dither pattern */
- v->hpcr_clear_flag = _mesa_getenv("MESA_HPCR_CLEAR") ? GL_TRUE : GL_FALSE;
-
- if (v->hpcr_clear_flag) {
- v->hpcr_clear_pixmap = XMesaCreatePixmap(v->display,
- DefaultRootWindow(v->display),
- 16, 2, 8);
-#ifndef XFree86Server
- v->hpcr_clear_ximage = XGetImage(v->display, v->hpcr_clear_pixmap,
- 0, 0, 16, 2, AllPlanes, ZPixmap);
-#endif
- }
-}
-
-
-/**
* Setup RGB rendering for a window with a True/DirectColor visual.
*/
static void
@@ -1039,13 +921,6 @@ setup_truecolor(XMesaVisual v, XMesaBuffer buffer, XMesaColormap cmap)
v->undithered_pf = PF_5R6G5B;
v->dithered_pf = PF_Dither_5R6G5B;
}
- else if (GET_REDMASK(v) ==0xe0
- && GET_GREENMASK(v)==0x1c
- && GET_BLUEMASK(v) ==0x03
- && CHECK_FOR_HPCR(v)) {
- /* 8-bit HP color recovery */
- setup_8bit_hpcr( v );
- }
}
@@ -1198,23 +1073,6 @@ initialize_visual_and_buffer(XMesaVisual v, XMesaBuffer b,
}
#endif
XMesaSetFunction( v->display, b->swapgc, GXcopy );
- /*
- * Set fill style and tile pixmap once for all for HPCR stuff
- * (instead of doing it each time in clear_color_HPCR_pixmap())
- * Initialize whole stuff
- * Patch contributed by Jacques Leroy March 8, 1998.
- */
- if (v->hpcr_clear_flag && b->backxrb && b->backxrb->pixmap) {
- int i;
- for (i = 0; i < 16; i++) {
- XMesaPutPixel(v->hpcr_clear_ximage, i, 0, 0);
- XMesaPutPixel(v->hpcr_clear_ximage, i, 1, 0);
- }
- XMesaPutImage(b->display, (XMesaDrawable) v->hpcr_clear_pixmap,
- b->cleargc, v->hpcr_clear_ximage, 0, 0, 0, 0, 16, 2);
- XMesaSetFillStyle( v->display, b->cleargc, FillTiled);
- XMesaSetTile( v->display, b->cleargc, v->hpcr_clear_pixmap );
- }
/* Initialize the row buffer XImage for use in write_color_span() */
data = (char*) MALLOC(MAX_WIDTH*4);
@@ -1275,8 +1133,6 @@ xmesa_color_to_pixel(GLcontext *ctx,
case PF_1Bit:
/* 382 = (3*255)/2 */
return ((r+g+b) > 382) ^ xmesa->xm_visual->bitFlip;
- case PF_HPCR:
- return DITHER_HPCR(1, 1, r, g, b);
case PF_Lookup:
{
LOOKUP_SETUP;
@@ -2293,8 +2149,6 @@ unsigned long XMesaDitherColor( XMesaContext xmesa, GLint x, GLint y,
case PF_1Bit:
/* 382 = (3*255)/2 */
return ((r+g+b) > 382) ^ xmesa->xm_visual->bitFlip;
- case PF_HPCR:
- return DITHER_HPCR(x, y, r, g, b);
case PF_Lookup:
{
LOOKUP_SETUP;