[maemo-commits] [maemo-commits] r18761 - in projects/haf/trunk/clutter0.8: clutter/eglx debian
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Thu Jun 18 18:24:11 EEST 2009
- Previous message: [maemo-commits] r18760 - in projects/haf/trunk/libmatchbox2: . matchbox/core
- Next message: [maemo-commits] r18762 - in projects/haf/trunk/sapwood: . server
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: gw
Date: 2009-06-18 18:24:01 +0300 (Thu, 18 Jun 2009)
New Revision: 18761
Modified:
projects/haf/trunk/clutter0.8/clutter/eglx/clutter-eglx-texture-pixmap.c
projects/haf/trunk/clutter0.8/debian/changelog
Log:
* clutter/eglx/clutter-eglx-texture-pixmap.c: When we fail to create a
pixmap surface for our pixmap (probably because of low SGX wrapped memory),
use our fallback GLES-only code.
Modified: projects/haf/trunk/clutter0.8/clutter/eglx/clutter-eglx-texture-pixmap.c
===================================================================
--- projects/haf/trunk/clutter0.8/clutter/eglx/clutter-eglx-texture-pixmap.c 2009-06-18 14:28:01 UTC (rev 18760)
+++ projects/haf/trunk/clutter0.8/clutter/eglx/clutter-eglx-texture-pixmap.c 2009-06-18 15:24:01 UTC (rev 18761)
@@ -123,6 +123,8 @@
EGLint red = -1, green = -1, blue = -1, alpha = -1, stencil = -1;
EGLint rgba_bindable = -1, rgb_bindable = -1, tex_target = -1;
+ if (!conf) return;
+
eglGetConfigAttrib (clutter_eglx_display (),
conf,
EGL_RED_SIZE, &red);
@@ -312,10 +314,13 @@
if (priv->egl_surface == EGL_NO_SURFACE)
{
- g_warning ("%s: error %x, failed to create %s surface for %lx",
+ g_warning ("%s: error %x, failed to create %s surface for %lx, "
+ "using GLES fallback.",
__FUNCTION__, eglGetError (),
pixmap ? "pixmap" : "window",
pixmap ? pixmap : window);
+
+ priv->use_fallback = TRUE;
return;
}
@@ -447,25 +452,25 @@
EGLSurface *surface, Pixmap pixmap,
int depth)
{
- EGLConfig configs[20];
- int i, nconfigs = 0;
- EGLBoolean ret;
- gboolean has_alpha = depth==32;
+ EGLConfig configs[20];
+ int i, nconfigs = 0;
+ EGLBoolean ret;
+ gboolean has_alpha = depth==32;
- ret = eglChooseConfig (display, pixmap_config, configs,
- G_N_ELEMENTS (configs), &nconfigs);
+ ret = eglChooseConfig (display, pixmap_config, configs,
+ G_N_ELEMENTS (configs), &nconfigs);
- if (ret != EGL_TRUE)
- {
- g_debug ("%s: eglChooseConfig failed: %x", __FUNCTION__, eglGetError());
- return NULL;
- }
+ if (ret != EGL_TRUE)
+ {
+ g_debug ("%s: eglChooseConfig failed: %x", __FUNCTION__, eglGetError());
+ return NULL;
+ }
/*else
{
g_debug ("%s: got %d matching configs", __FUNCTION__, nconfigs);
}*/
- for (i = 0; i < nconfigs; ++i)
+ for (i = 0; i < nconfigs; ++i)
{
if (has_alpha)
*surface = eglCreatePixmapSurface (display, configs[i],
@@ -477,14 +482,15 @@
pixmap_creation_config_rgb);
if (*surface != EGL_NO_SURFACE)
- break;
+ return configs[i];
g_debug ("%s: eglCreatePixmapSurface failed for config:",
__FUNCTION__);
print_config_info (configs[i]);
}
- return configs[i];
+ /* We failed to get any surface */
+ return NULL;
}
static void
Modified: projects/haf/trunk/clutter0.8/debian/changelog
===================================================================
--- projects/haf/trunk/clutter0.8/debian/changelog 2009-06-18 14:28:01 UTC (rev 18760)
+++ projects/haf/trunk/clutter0.8/debian/changelog 2009-06-18 15:24:01 UTC (rev 18761)
@@ -2,8 +2,12 @@
Kimmo:
* Fix some minor Coverity issues, such as unused variables.
+ Gordon:
+ * clutter/eglx/clutter-eglx-texture-pixmap.c: When we fail to create a
+ pixmap surface for our pixmap (probably because of low SGX wrapped memory),
+ use our fallback GLES-only code.
- -- Gordon Williams <gordon.williams at collabora.co.uk> Mon, 15 Jun 2009 09:26:15 +0300
+ -- Gordon Williams <gordon.williams at collabora.co.uk> Thu, 18 Jun 2009 16:22:15 +0100
clutter (0.8.2-0maemo36) unstable; urgency=low
- Previous message: [maemo-commits] r18760 - in projects/haf/trunk/libmatchbox2: . matchbox/core
- Next message: [maemo-commits] r18762 - in projects/haf/trunk/sapwood: . server
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
