Re: [compiz] [PATCH] Fix imageBufferToTexture for MSBFirst platforms.

2007-06-01 Thread Michel Dänzer
On Thu, 2007-05-31 at 13:38 -0400, David Reveman wrote:
 On Wed, 2007-05-23 at 15:37 +0200, Michel Dänzer wrote:
  Fixes icon colours on my PowerBook.
  
  Given that the preprocessor test was reversed when the code was reorganized 
  and
  nobody on !MSBFirst platforms complained, one code path should suffice.
 
 Hm, I'm not sure what's going on here. I fixed the mistake from the
 reorganization. 

Thanks.

 If byte order doesn't actually matter for the icon data
 then I think the iconToTexture function should be changed to reflect
 that and not imageBufferToTexture.

BTW, I failed to mention (or hadn't noticed yet) that other textures
such as the cube top image are affected in the same way. Does that
change the situation?


-- 
Earthling Michel Dänzer   |  http://tungstengraphics.com
Libre software enthusiast |  Debian, X and DRI developer

___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz


Re: [compiz] [PATCH] Fix imageBufferToTexture for MSBFirst platforms.

2007-05-31 Thread David Reveman
On Wed, 2007-05-23 at 15:37 +0200, Michel Dänzer wrote:
 Fixes icon colours on my PowerBook.
 
 Given that the preprocessor test was reversed when the code was reorganized 
 and
 nobody on !MSBFirst platforms complained, one code path should suffice.

Hm, I'm not sure what's going on here. I fixed the mistake from the
reorganization. If byte order doesn't actually matter for the icon data
then I think the iconToTexture function should be changed to reflect
that and not imageBufferToTexture.

 ---
  src/texture.c |5 -
  1 files changed, 0 insertions(+), 5 deletions(-)
 
 diff --git a/src/texture.c b/src/texture.c
 index 4170c70..7021643 100644
 --- a/src/texture.c
 +++ b/src/texture.c
 @@ -164,13 +164,8 @@ imageBufferToTexture (CompScreen   *screen,
 unsigned int width,
 unsigned int height)
  {
 -#if IMAGE_BYTE_ORDER == MSBFirst
 -return imageToTexture (screen, texture, image, width, height,
 -GL_BGRA, GL_UNSIGNED_BYTE);
 -#else
  return imageToTexture (screen, texture, image, width, height,
  GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV);
 -#endif
  }
  
  Bool
 -- 
 1.5.2-rc3.GIT
 
 
 
-David

___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz


[compiz] [PATCH] Fix imageBufferToTexture for MSBFirst platforms.

2007-05-23 Thread Michel Dänzer

Fixes icon colours on my PowerBook.

Given that the preprocessor test was reversed when the code was reorganized and
nobody on !MSBFirst platforms complained, one code path should suffice.
---
 src/texture.c |5 -
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/src/texture.c b/src/texture.c
index 4170c70..7021643 100644
--- a/src/texture.c
+++ b/src/texture.c
@@ -164,13 +164,8 @@ imageBufferToTexture (CompScreen   *screen,
  unsigned int width,
  unsigned int height)
 {
-#if IMAGE_BYTE_ORDER == MSBFirst
-return imageToTexture (screen, texture, image, width, height,
-  GL_BGRA, GL_UNSIGNED_BYTE);
-#else
 return imageToTexture (screen, texture, image, width, height,
   GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV);
-#endif
 }
 
 Bool
-- 
1.5.2-rc3.GIT



-- 
Earthling Michel Dänzer   |  http://tungstengraphics.com
Libre software enthusiast |  Debian, X and DRI developer

___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz