]> git.hungrycats.org Git - xscreensaver/blobdiff - jwxyz/jwxyz-image.c
From https://www.jwz.org/xscreensaver/xscreensaver-6.09.tar.gz
[xscreensaver] / jwxyz / jwxyz-image.c
index a419965be594b9b9388602a65c0f9cdc3603d700..dc644ee885a0fdfb0bed6094a2c80d1fc38c999a 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1991-2018 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1991-2020 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
 
 /* JWXYZ Is Not Xlib.
 
-   But it's a bunch of function definitions that bear some resemblance to
-   Xlib and that do things to an XImage that bear some resemblance to the
-   things that Xlib might have done.
+   Pixmaps implemented in CPU RAM, for Android OpenGL hacks.
+   Renders into an XImage, basically.
 
-   This handles things when jwxyz-gl.c can't.
+   See the comment at the top of jwxyz-common.c for an explanation of
+   the division of labor between these various modules.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -64,12 +64,17 @@ jwxyz_image_make_display (Window w, const unsigned char *rgba_bytes)
   Visual *v = &d->visual;
   v->class      = TrueColor;
   Assert (rgba_bytes[3] == 3, "alpha not last");
+  unsigned long masks[4];
   for (unsigned i = 0; i != 4; ++i) {
     union color_bytes color;
     color.pixel = 0;
     color.bytes[rgba_bytes[i]] = 0xff;
-    v->rgba_masks[i] = color.pixel;
+    masks[i] = color.pixel;
   }
+  v->red_mask   = masks[0];
+  v->green_mask = masks[1];
+  v->blue_mask  = masks[2];
+  v->alpha_mask = masks[3];
 
   d->timers_data = jwxyz_sources_init (XtDisplayToApplicationContext (d));
   d->window_background = BlackPixel(d,0);