1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 04:20:27 +01:00

- removed hermeslib dependancy

- added back old asm/mmx code
This commit is contained in:
dan
2002-09-30 12:39:22 +00:00
parent 11c466ec26
commit 1941aaf34a
9 changed files with 175 additions and 235 deletions

View File

@@ -32,12 +32,6 @@
#include <math.h>
#include "wrasterP.h"
#ifdef HAVE_HERMES
#include <Hermes/Hermes.h>
#endif
#include "StdCmap.h"
#include "wraster.h"
@@ -706,66 +700,17 @@ RCreateContext(Display *dpy, int screen_number, RContextAttributes *attribs)
context->copy_gc = XCreateGC(dpy, context->drawable, GCFunction
|GCGraphicsExposures, &gcv);
#ifdef HAVE_HERMES
context->hermes_data = malloc(sizeof(RHermesData));
if (!context->hermes_data) {
RErrorCode = RERR_NOMEMORY;
free(context);
return NULL;
}
Hermes_Init();
context->hermes_data->palette = Hermes_PaletteInstance();
{
unsigned long flags = 0;
if (context->attribs->render_mode == RDitheredRendering) {
flags |= HERMES_CONVERT_DITHER;
}
context->hermes_data->converter = Hermes_ConverterInstance(flags);
}
#endif
if (context->vclass == PseudoColor || context->vclass == StaticColor) {
if (!setupPseudoColorColormap(context)) {
free(context);
return NULL;
}
#ifdef HAVE_HERMES
{
int32 palette[256];
int i;
for (i = 0; i < context->ncolors; i++) {
palette[i] = ((context->colors[i].red >> 8) << 16) ||
((context->colors[i].green >> 8) << 8) ||
((context->colors[i].blue >> 8));
}
Hermes_PaletteSet(context->hermes_data->palette, palette);
}
#endif
} else if (context->vclass == GrayScale || context->vclass == StaticGray) {
context->colors = allocateGrayScale(context);
if (!context->colors) {
free(context);
return NULL;
}
#ifdef HAVE_HERMES
{
int32 palette[256];
int i;
for (i = 0; i < context->ncolors; i++) {
palette[i] = ((context->colors[i].red >> 8) << 16) ||
((context->colors[i].green >> 8) << 8) ||
((context->colors[i].blue >> 8));
}
Hermes_PaletteSet(context->hermes_data->palette, palette);
}
#endif
} else if (context->vclass == TrueColor) {
/* calc offsets to create a TrueColor pixel */
context->red_offset = count_offset(context->visual->red_mask);
@@ -776,10 +721,7 @@ RCreateContext(Display *dpy, int screen_number, RContextAttributes *attribs)
context->attribs->render_mode = RBestMatchRendering;
}
#ifdef HAVE_HERMES
#endif
/* check avaiability of MIT-SHM */
#ifdef XSHM
if (!(context->attribs->flags & RC_UseSharedMemory)) {