[Pkg-wmaker-commits] [wmbubble] 199/207: Actually use the intended renderer on 24-in-32bpp displays
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Mon Aug 24 04:18:34 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmbubble.
commit 5878ee2a95f7ae8727f2d4e32d5c2968135c6216
Author: Robert Jacobs <rnjacobs at mit.edu>
Date: Wed Feb 18 19:19:44 2015 -0800
Actually use the intended renderer on 24-in-32bpp displays
---
Makefile | 1 +
wmx11pixmap.c | 11 ++++++-----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index eb77280..1b4ea1c 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,7 @@ PREFIX = /usr/local
CFLAGS += -ansi -Wall -O3
# profiling cflags
# CFLAGS = -ansi -Wall -O3 -pg -DPRO=50000
+# LDFLAGS = -pg
# test coverage cflags
# CFLAGS = -ansi -Wall -ggdb -fprofile-arcs -ftest-coverage -DPRO=50000
diff --git a/wmx11pixmap.c b/wmx11pixmap.c
index 29f4981..5dd71c4 100644
--- a/wmx11pixmap.c
+++ b/wmx11pixmap.c
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <sys/types.h>
#include "wmx11pixmap.h"
/* Private variables */
@@ -29,17 +30,17 @@ static int flush_expose(Window w) {
}
void RGBtoXIm(const unsigned char * from, XImage * ximout) {
- unsigned long * p32 = (unsigned long *)ximout->data;
- unsigned short * p16 = (unsigned short *)ximout->data;
+ u_int32_t * p32 = (u_int32_t *)ximout->data;
+ u_int16_t * p16 = (u_int16_t *)ximout->data;
unsigned long pxl;
int i, yy;
/* violatin' the abstractions! */
- switch (ximout->depth | ((ximout->red_mask|ximout->green_mask)<<8)) {
- case 0xFFFF0020: /* 24bpp RGB */
+ switch (ximout->bits_per_pixel | ((ximout->red_mask|ximout->green_mask)<<8)) {
+ case 0xFFFF0020: /* 24-in-32bpp RGB */
for (i=0;i<BOX_SIZE*BOX_SIZE;i++,from+=3)
p32[i] = (from[0]<<16) | (from[1]<<8) | (from[2]);
break;
- case 0x00FFFF20: /* 24bpp BGR */
+ case 0x00FFFF20: /* 24-in-32bpp BGR */
for (i=0;i<BOX_SIZE*BOX_SIZE;i++,from+=3)
p32[i] = (from[2]<<16) | (from[1]<<8) | (from[0]);
break;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbubble.git
More information about the Pkg-wmaker-commits
mailing list