aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drmtools.c10
-rw-r--r--fb-gui.c36
-rw-r--r--fbtools.c10
-rw-r--r--gfx.h4
4 files changed, 0 insertions, 60 deletions
diff --git a/drmtools.c b/drmtools.c
index 1f40618..acccc29 100644
--- a/drmtools.c
+++ b/drmtools.c
@@ -277,16 +277,6 @@ gfxstate *drm_init(const char *device, const char *output,
gfx->mem = fb1.mem;
gfx->fmt = fmt;
- gfx->rlen = PIXMAN_FORMAT_R(fmt->pixman);
- gfx->glen = PIXMAN_FORMAT_G(fmt->pixman);
- gfx->blen = PIXMAN_FORMAT_B(fmt->pixman);
- gfx->tlen = PIXMAN_FORMAT_A(fmt->pixman);
- gfx->roff = gfx->blen + gfx->glen;
- gfx->goff = gfx->blen;
- gfx->boff = 0;
- gfx->toff = gfx->blen + gfx->glen + gfx->rlen;
- gfx->bits_per_pixel = PIXMAN_FORMAT_BPP(fmt->pixman);
-
gfx->restore_display = drm_restore_display;
gfx->cleanup_display = drm_cleanup_display;
gfx->flush_display = drm_flush_display;
diff --git a/fb-gui.c b/fb-gui.c
index 9997732..37634d0 100644
--- a/fb-gui.c
+++ b/fb-gui.c
@@ -21,8 +21,6 @@ static int xs = 10;
/* ---------------------------------------------------------------------- */
/* shadow framebuffer -- internals */
-static int32_t s_lut_transp[256], s_lut_red[256], s_lut_green[256], s_lut_blue[256];
-
static unsigned char **shadow;
static unsigned int swidth,sheight;
@@ -32,26 +30,6 @@ static pixman_image_t *pixman;
static unsigned char *framebuffer;
static cairo_font_extents_t extents;
-static void shadow_lut_init_one(int32_t *lut, int bits, int shift)
-{
- int i;
-
- if (bits > 8)
- for (i = 0; i < 256; i++)
- lut[i] = (i << (bits + shift - 8));
- else
- for (i = 0; i < 256; i++)
- lut[i] = (i >> (8 - bits)) << shift;
-}
-
-static void shadow_lut_init(gfxstate *gfx)
-{
- shadow_lut_init_one(s_lut_transp, gfx->tlen, gfx->toff);
- shadow_lut_init_one(s_lut_red, gfx->rlen, gfx->roff);
- shadow_lut_init_one(s_lut_green, gfx->glen, gfx->goff);
- shadow_lut_init_one(s_lut_blue, gfx->blen, gfx->boff);
-}
-
/* ---------------------------------------------------------------------- */
/* shadow framebuffer -- management interface */
@@ -107,20 +85,6 @@ void shadow_init(gfxstate *gfx)
pixman = pixman_image_create_bits(PIXMAN_x8r8g8b8, swidth, sheight,
(void*)framebuffer, swidth * 4);
shadow_clear();
-
- /* init rendering */
- switch (gfx->bits_per_pixel) {
- case 15:
- case 16:
- case 24:
- case 32:
- shadow_lut_init(gfx);
- break;
- default:
- fprintf(stderr, "Oops: %i bit/pixel ???\n",
- gfx->bits_per_pixel);
- exit(1);
- }
}
void shadow_fini(void)
diff --git a/fbtools.c b/fbtools.c
index 7b1def2..30021fb 100644
--- a/fbtools.c
+++ b/fbtools.c
@@ -310,16 +310,6 @@ gfxstate* fb_init(const char *device, char *mode)
gfx->mem = fb_mem;
gfx->fmt = fmt;
- gfx->rlen = fb_var.red.length;
- gfx->glen = fb_var.green.length;
- gfx->blen = fb_var.blue.length;
- gfx->tlen = fb_var.transp.length;
- gfx->roff = fb_var.red.offset;
- gfx->goff = fb_var.green.offset;
- gfx->boff = fb_var.blue.offset;
- gfx->toff = fb_var.transp.offset;
- gfx->bits_per_pixel = fb_var.bits_per_pixel;
-
gfx->restore_display = fb_restore_display;
gfx->cleanup_display = fb_cleanup_display;
diff --git a/gfx.h b/gfx.h
index be4f987..f060d38 100644
--- a/gfx.h
+++ b/gfx.h
@@ -39,10 +39,6 @@ struct gfxstate {
uint8_t *mem2;
gfxfmt *fmt;
- uint32_t bits_per_pixel;
- uint32_t rlen, glen, blen, tlen;
- uint32_t roff, goff, boff, toff;
-
char devpath[128];
dev_t devnum;