[maemo-commits] [maemo-commits] r17580 - in projects/haf/trunk/clutter: clutter clutter/cogl/common clutter/cogl/gles debian
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Tue Mar 3 15:04:12 EET 2009
- Previous message: [maemo-commits] r17579 - projects/haf/tags/osso-af-startup/1.77-1/services
- Next message: [maemo-commits] r17581 - in projects/haf/trunk/hildon-help: . debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: gw Date: 2009-03-03 15:04:10 +0200 (Tue, 03 Mar 2009) New Revision: 17580 Modified: projects/haf/trunk/clutter/clutter/clutter-main.h projects/haf/trunk/clutter/clutter/cogl/common/pvr-texture.c projects/haf/trunk/clutter/clutter/cogl/gles/cogl-gles2-wrapper.c projects/haf/trunk/clutter/clutter/cogl/gles/cogl-gles2-wrapper.h projects/haf/trunk/clutter/debian/changelog Log: * Changed color_enable (and added color_array_enable) to ensure that colour is set correctly even when drawing colour using arrays * added small speedup to PVRTC * Modified timeline priority to ensure that animation happens before redraws Modified: projects/haf/trunk/clutter/clutter/clutter-main.h =================================================================== --- projects/haf/trunk/clutter/clutter/clutter-main.h 2009-03-03 11:31:33 UTC (rev 17579) +++ projects/haf/trunk/clutter/clutter/clutter-main.h 2009-03-03 13:04:10 UTC (rev 17580) @@ -67,7 +67,7 @@ * * Since: 0.8 */ -#define CLUTTER_PRIORITY_REDRAW (G_PRIORITY_DEFAULT + 10) +#define CLUTTER_PRIORITY_REDRAW (G_PRIORITY_DEFAULT + 35) /** * CLUTTER_PRIORITY_TIMELINE: Modified: projects/haf/trunk/clutter/clutter/cogl/common/pvr-texture.c =================================================================== --- projects/haf/trunk/clutter/clutter/cogl/common/pvr-texture.c 2009-03-03 11:31:33 UTC (rev 17579) +++ projects/haf/trunk/clutter/clutter/cogl/common/pvr-texture.c 2009-03-03 13:04:10 UTC (rev 17580) @@ -53,6 +53,13 @@ gint r,g,b,a; gint namt = 255-amt; + /* shortcut for simple case */ + if (amt==0) + { + memcpy(dest, src1, sizeof(Color)); + return; + } + r = ((src1->red * namt) + (src2->red * amt)) >> 8; g = ((src1->green * namt) + (src2->green * amt)) >> 8; b = ((src1->blue * namt) + (src2->blue * amt)) >> 8; Modified: projects/haf/trunk/clutter/clutter/cogl/gles/cogl-gles2-wrapper.c =================================================================== --- projects/haf/trunk/clutter/clutter/cogl/gles/cogl-gles2-wrapper.c 2009-03-03 11:31:33 UTC (rev 17579) +++ projects/haf/trunk/clutter/clutter/cogl/gles/cogl-gles2-wrapper.c 2009-03-03 13:04:10 UTC (rev 17580) @@ -145,6 +145,9 @@ if (a->color_enabled != b->color_enabled) return FALSE; + if (a->color_array_enabled != b->color_array_enabled) + return FALSE; + if (a->texture_2d_enabled && a->alpha_only != b->alpha_only) return FALSE; @@ -240,6 +243,7 @@ GLuint shader_obj; CoglGles2WrapperShader *shader; GSList *node; + gboolean color_enabled; _COGL_GET_GLES2_WRAPPER (w, NULL); @@ -251,10 +255,13 @@ FALSE, TRUE)) return (CoglGles2WrapperShader *) node->data; + color_enabled = settings->color_enabled || + settings->color_array_enabled; + /* Otherwise create a new shader */ shader_source = g_string_new (cogl_fixed_fragment_shader_header_start); - if (settings->color_enabled || + if (color_enabled || (!settings->texture_2d_enabled) || settings->alpha_only) g_string_append (shader_source, cogl_fixed_fragment_shader_header_color); @@ -273,7 +280,7 @@ cogl_fixed_fragment_shader_texture_alpha_only); else { - if (settings->color_enabled) + if (color_enabled) g_string_append (shader_source, cogl_fixed_fragment_shader_texture_color); else @@ -1004,6 +1011,11 @@ _COGL_GLES2_CHANGE_SETTING (w, alpha_test_enabled, TRUE); break; + case GL_COLOR_ARRAY: + _COGL_GLES2_CHANGE_SETTING (w, color_array_enabled, TRUE); + glEnable (cap); + break; + default: glEnable (cap); } @@ -1028,6 +1040,11 @@ _COGL_GLES2_CHANGE_SETTING (w, alpha_test_enabled, FALSE); break; + case GL_COLOR_ARRAY: + _COGL_GLES2_CHANGE_SETTING (w, color_array_enabled, FALSE); + glDisable (cap); + break; + case GL_LIGHTING: /* We never did lighting anyway */ break; Modified: projects/haf/trunk/clutter/clutter/cogl/gles/cogl-gles2-wrapper.h =================================================================== --- projects/haf/trunk/clutter/clutter/cogl/gles/cogl-gles2-wrapper.h 2009-03-03 11:31:33 UTC (rev 17579) +++ projects/haf/trunk/clutter/clutter/cogl/gles/cogl-gles2-wrapper.h 2009-03-03 13:04:10 UTC (rev 17580) @@ -82,6 +82,7 @@ GLint alpha_test_func; gboolean color_enabled; + gboolean color_array_enabled; gboolean fog_enabled; GLint fog_mode; Modified: projects/haf/trunk/clutter/debian/changelog =================================================================== --- projects/haf/trunk/clutter/debian/changelog 2009-03-03 11:31:33 UTC (rev 17579) +++ projects/haf/trunk/clutter/debian/changelog 2009-03-03 13:04:10 UTC (rev 17580) @@ -7,6 +7,10 @@ * Refactored PVR texture compression code into GL-related and non-GL related code * Don't crash if fonts are not installed. + * Changed color_enable (and added color_array_enable) to ensure that colour + is set correctly even when drawing colour using arrays + * added small speedup to PVRTC + * Modified timeline priority to ensure that animation happens before redraws -- Gordon Williams <gordon.williams at collabora.co.uk> Mon, 2 Mar 2009 09:37:27 +0200 @@ -17,6 +21,10 @@ * Changed colour ranges for _cogl_bitmap_check_alpha to make it more safe * Changed _cogl_bitmap_check_alpha to be 100% safe (at the expense of colour depth) - bug 102062 + * Changed color_enable (and added color_array_enable) to ensure that colour + is set correctly even when drawing colour using arrays + * added small speedup to PVRTC + * Modified timeline priority to ensure that animation happens before redraws -- Gordon Williams <gordon.williams at collabora.co.uk> Mon, 02 Mar 2009 09:35:09 +0200
- Previous message: [maemo-commits] r17579 - projects/haf/tags/osso-af-startup/1.77-1/services
- Next message: [maemo-commits] r17581 - in projects/haf/trunk/hildon-help: . debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]