[maemo-commits] [maemo-commits] r17237 - in projects/haf/trunk/clutter: clutter/eglx debian
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Tue Jan 20 18:30:17 EET 2009
- Previous message: [maemo-commits] r17234 - in projects/haf/trunk/gtk+: . gtk
- Next message: [maemo-commits] r17238 - in projects/haf/trunk/libmatchbox2: . matchbox/comp-mgr
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: gw
Date: 2009-01-20 18:29:57 +0200 (Tue, 20 Jan 2009)
New Revision: 17237
Modified:
projects/haf/trunk/clutter/clutter/eglx/clutter-eglx-texture-pixmap.c
projects/haf/trunk/clutter/debian/changelog
Log:
* Added code to draw a black rectangle with a red border for any window that
doesn't have a pixmap (as opposed to just spamming stdout)
Modified: projects/haf/trunk/clutter/clutter/eglx/clutter-eglx-texture-pixmap.c
===================================================================
--- projects/haf/trunk/clutter/clutter/eglx/clutter-eglx-texture-pixmap.c 2009-01-19 20:51:42 UTC (rev 17236)
+++ projects/haf/trunk/clutter/clutter/eglx/clutter-eglx-texture-pixmap.c 2009-01-20 16:29:57 UTC (rev 17237)
@@ -678,11 +678,34 @@
return actor;
}
+static void
+clutter_eglx_texture_pixmap_paint_fail (ClutterActor *actor)
+{
+ ClutterGeometry geom;
+ ClutterColor col_black = {0,0,0,255};
+ ClutterColor col_red = {255,0,0,255};
+ guint w,h;
+
+ clutter_actor_get_allocation_geometry (actor, &geom);
+ w = geom.width;
+ h = geom.height;
+
+ col_black.alpha = col_red.alpha = clutter_actor_get_paint_opacity (actor);
+
+ /* red border on black rectangle */
+ cogl_color (&col_black);
+ cogl_rectangle (10, 10, w-10, h-10);
+ cogl_color (&col_red);
+ cogl_rectangle (0, 0, w, 10);
+ cogl_rectangle (0, h-10, w, 10);
+ cogl_rectangle (0, 10, 10, h-20);
+ cogl_rectangle (w-10, 10, 10, h-20);
+}
+
void
clutter_eglx_texture_pixmap_paint (ClutterActor *actor)
{
guint pixmap, pixmap_depth, pixmap_width, pixmap_height;
- guint window;
ClutterEGLXTexturePixmapPrivate *priv;
int do_release = 1;
@@ -709,13 +732,16 @@
if (priv->egl_surface == EGL_NO_SURFACE)
{
+ /*
+ guint window;
const gchar *name = clutter_actor_get_name(actor);
g_object_get (actor, "window", &window, NULL);
g_debug ("%s: Buffer not created "
"(name '%s', pixmap %d, window 0x%x, width %d, height %d, depth %d)",
__FUNCTION__,
name ? name : "null",
- pixmap, window, pixmap_width, pixmap_height, pixmap_depth);
+ pixmap, window, pixmap_width, pixmap_height, pixmap_depth);*/
+ clutter_eglx_texture_pixmap_paint_fail (actor);
return;
}
Modified: projects/haf/trunk/clutter/debian/changelog
===================================================================
--- projects/haf/trunk/clutter/debian/changelog 2009-01-19 20:51:42 UTC (rev 17236)
+++ projects/haf/trunk/clutter/debian/changelog 2009-01-20 16:29:57 UTC (rev 17237)
@@ -14,6 +14,8 @@
* quick fix to get update area working on scratchbox
* Added a whole load of floating point matrix functions to stop the
inaccuracies that were corrupting the screen in update_area calls.
+ * Added code to draw a black rectangle with a red border for any window that
+ doesn't have a pixmap (as opposed to just spamming stdout)
-- Gordon Williams <gordon.williams at collabora.co.uk> Mon, 19 Jan 2009 16:21:48 +0000
- Previous message: [maemo-commits] r17234 - in projects/haf/trunk/gtk+: . gtk
- Next message: [maemo-commits] r17238 - in projects/haf/trunk/libmatchbox2: . matchbox/comp-mgr
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
