[maemo-commits] [maemo-commits] r17435 - in projects/haf/trunk/clutter: clutter/cogl/gles debian

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Mon Feb 16 14:35:51 EET 2009
Author: gw
Date: 2009-02-16 14:35:50 +0200 (Mon, 16 Feb 2009)
New Revision: 17435

Modified:
   projects/haf/trunk/clutter/clutter/cogl/gles/cogl-context.c
   projects/haf/trunk/clutter/debian/changelog
Log:
  * committed patch from 
http://bugzilla.openedhand.com/show_bug.cgi?id=1228


Modified: projects/haf/trunk/clutter/clutter/cogl/gles/cogl-context.c
===================================================================
--- projects/haf/trunk/clutter/clutter/cogl/gles/cogl-context.c	2009-02-16 08:07:49 UTC (rev 17434)
+++ projects/haf/trunk/clutter/clutter/cogl/gles/cogl-context.c	2009-02-16 12:35:50 UTC (rev 17435)
@@ -78,7 +78,19 @@
   
   /* Init OpenGL state */
   GE( cogl_wrap_glTexEnvx (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE) );
-  GE( glColorMask (TRUE, TRUE, TRUE, FALSE) );
+
+  /* fill performance drops on some devices (PVR arm driver) when colormask is
+   * set. Mask off alpha only if alpha channel really exist.
+   */
+  {
+      GLint alphaSize = 0;
+      glGetIntegerv(GL_ALPHA_BITS, &alphaSize);
+      if (alphaSize > 0)
+      { 
+          GE( glColorMask (TRUE, TRUE, TRUE, FALSE) );
+      }
+  }
+
   GE( glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) );
   cogl_enable (0);
   

Modified: projects/haf/trunk/clutter/debian/changelog
===================================================================
--- projects/haf/trunk/clutter/debian/changelog	2009-02-16 08:07:49 UTC (rev 17434)
+++ projects/haf/trunk/clutter/debian/changelog	2009-02-16 12:35:50 UTC (rev 17435)
@@ -3,6 +3,7 @@
   * Started to compile without debug code and Gobject checks, so that we get
     enough testing for the code without checking code (which can affect the
     behaviour).
+  * committed patch from http://bugzilla.openedhand.com/show_bug.cgi?id=1228
 
  -- Gordon Williams <gordon.williams at collabora.co.uk>  Sat, 14 Feb 2009 14:15:52 +0200
 


More information about the maemo-commits mailing list