diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-02-23 08:56:28 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-02-23 08:56:28 +0100 |
commit | 6d62ddcf9d95c5ddcbe1da14630cc69b44076f3c (patch) | |
tree | e2260ff2c67e81bd36dddf01b40472254596af1f | |
parent | d4aad4f7b58e51fb8573c84c9e47718a209b7896 (diff) | |
download | fbida-6d62ddcf9d95c5ddcbe1da14630cc69b44076f3c.tar.gz |
drop dead code
-rw-r--r-- | drmtools.c | 10 | ||||
-rw-r--r-- | fb-gui.c | 36 | ||||
-rw-r--r-- | fbtools.c | 10 | ||||
-rw-r--r-- | gfx.h | 4 |
4 files changed, 0 insertions, 60 deletions
@@ -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; @@ -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) @@ -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; @@ -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; |