[mutter] iconcache: Fix apply_mask
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] iconcache: Fix apply_mask
- Date: Mon, 21 Mar 2011 23:09:30 +0000 (UTC)
commit 92663c81f58e386682044681d4f0650d99b78899
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Feb 28 03:41:08 2011 -0500
iconcache: Fix apply_mask
apply_mask made some wrong assumptions that became untrue
after rendering_cleanup landed, such as the number of channels
in the pixmap, causing corruption.
https://bugzilla.gnome.org/show_bug.cgi?id=641975
src/core/iconcache.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/src/core/iconcache.c b/src/core/iconcache.c
index df9b8dc..547aee0 100644
--- a/src/core/iconcache.c
+++ b/src/core/iconcache.c
@@ -352,16 +352,10 @@ apply_mask (GdkPixbuf *pixbuf,
j = 0;
while (j < w)
{
- guchar *s = src + i * src_stride + j * 3;
+ guchar *s = src + i * src_stride + j * 4;
guchar *d = dest + i * dest_stride + j * 4;
- /* s[0] == s[1] == s[2], they are 255 if the bit was set, 0
- * otherwise
- */
- if (s[0] == 0)
- d[3] = 0; /* transparent */
- else
- d[3] = 255; /* opaque */
+ d[3] = s[3];
++j;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]