Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
desktops.c desktops.h ecompmgr.c
Log Message:
Go back to using single unredirected root background window (speeds up
composite considerably).
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/desktops.c,v
retrieving revision 1.216
retrieving revision 1.217
diff -u -3 -r1.216 -r1.217
--- desktops.c 7 Jan 2006 07:20:57 -0000 1.216
+++ desktops.c 8 Jan 2006 23:44:13 -0000 1.217
@@ -449,7 +449,7 @@
if (desk == 0)
{
desks.current = dsk;
-#if 0 /* TBD - Use per virtual root bg window? */
+#if !USE_BG_WIN_ON_ALL_DESKS /* TBD - Use per virtual root bg window? */
/* Add background window */
eo = EobjWindowCreate(EOBJ_TYPE_MISC_NR, 0, 0, VRoot.w, VRoot.h,
0, "Root-bg");
@@ -474,6 +474,7 @@
HintsSetRootInfo(EoGetWin(dsk), None, 0);
}
+#if USE_BG_WIN_ON_ALL_DESKS /* TBD - Use per virtual root bg window? */
/* Add background window */
Esnprintf(buf, sizeof(buf), "Desk-bg-%d", desk);
eo = EobjWindowCreate(EOBJ_TYPE_MISC, 0, 0, VRoot.w, VRoot.h, 0, buf);
@@ -481,9 +482,9 @@
eo->fade = eo->shadow = 0;
EobjReparent(eo, EoObj(dsk), 0, 0);
EobjSetLayer(eo, 0);
- EobjMap(eo, 1);
dsk->bg.o = eo;
EventCallbackRegister(EobjGetWin(eo), 0, DeskHandleEvents, dsk);
+#endif
HintsSetRootHints(EoGetWin(dsk));
@@ -552,6 +553,11 @@
{
Window win;
+ if (EventDebug(EDBUG_TYPE_DESKS))
+ Eprintf("DeskBackgroundConfigure %d %#lx v=%d - %#lx %#lx %#lx\n",
+ dsk->num, EoGetWin(dsk), dsk->viewable,
+ EobjGetWin(dsk->bg.o), dsk->bg.pmap, dsk->bg.pixel);
+
if (dsk->bg.o != EoObj(dsk))
{
if (dsk->bg.bg)
@@ -569,7 +575,7 @@
if (dsk->viewable)
{
-#if 0 /* FIXME - Remove? */
+#if !USE_BG_WIN_ON_ALL_DESKS
if (ECompMgrDeskConfigure(dsk))
{
ESetWindowBackgroundPixmap(win, None);
@@ -1325,6 +1331,9 @@
ActionsResume();
ModulesSignal(ESIGNAL_DESK_SWITCH_DONE, NULL);
+
+ if (EventDebug(EDBUG_TYPE_DESKS))
+ Eprintf("DeskGoto %d done\n", dsk->num);
}
static void
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/desktops.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- desktops.h 7 Jan 2006 07:20:57 -0000 1.20
+++ desktops.h 8 Jan 2006 23:44:13 -0000 1.21
@@ -24,6 +24,8 @@
#ifndef _DESKTOPS_H_
#define _DESKTOPS_H_
+#define USE_BG_WIN_ON_ALL_DESKS 0
+
#include "eobj.h"
typedef struct _desk Desk;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ecompmgr.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -3 -r1.92 -r1.93
--- ecompmgr.c 7 Jan 2006 07:20:57 -0000 1.92
+++ ecompmgr.c 8 Jan 2006 23:44:14 -0000 1.93
@@ -478,7 +478,7 @@
XRenderFreePicture(disp, pict);
}
-#if 0 /* FIXME - Remove? */
+#if !USE_BG_WIN_ON_ALL_DESKS
/*
* Desk background
*/
@@ -501,16 +501,6 @@
return 1;
cw = eo->cmhook;
-#if 0
- if (!cw)
- {
- ECompMgrWinNew(eo);
- cw = eo->cmhook;
- if (!cw)
- return 0;
- }
-#endif
-
if (!dsk->viewable)
{
ECompMgrWinInvalidate(eo, INV_PICTURE);
@@ -1590,23 +1580,20 @@
EventCallbackUnregister(eo->win, 0, ECompMgrHandleWindowEvent, eo);
- if (!eo->noredir)
- {
- if (!eo->gone && Conf_compmgr.mode == ECM_MODE_WINDOW)
- XCompositeUnredirectWindow(disp, eo->win, CompositeRedirectManual);
- }
-
- ECompMgrWinInvalidate(eo, INV_ALL);
-
if (!eo->gone)
- {
- if (cw->picture != None)
- XRenderFreePicture(disp, cw->picture);
+ ECompMgrWinInvalidate(eo, INV_PICTURE);
+ if (!eo->noredir && !eo->gone)
+ {
if (cw->damage != None)
XDamageDestroy(disp, cw->damage);
+
+ if (Conf_compmgr.mode == ECM_MODE_WINDOW)
+ XCompositeUnredirectWindow(disp, eo->win, CompositeRedirectManual);
}
+ ECompMgrWinInvalidate(eo, INV_ALL);
+
_EFREE(eo->cmhook);
_ECM_SET_STACK_CHANGED();
@@ -1776,7 +1763,7 @@
eo_prev = eo2;
}
-#if 1 /* TBD - Only if using per desk bg overlay */
+#if USE_BG_WIN_ON_ALL_DESKS /* Only if using per desk bg overlay */
/* FIXME - We should break when the clip region becomes empty */
if (eo->x == 0 && eo->y == 0)
stop = 1;
@@ -1823,7 +1810,7 @@
break;
}
-#if 0 /* TBD - Not if using per desk bg overlay */
+#if !USE_BG_WIN_ON_ALL_DESKS /* Not if using per desk bg overlay */
/* FIXME - We should break when the clip region becomes empty */
if (eo->type == EOBJ_TYPE_DESK && eo->x == 0 && eo->y == 0)
stop = 1;
@@ -1973,7 +1960,7 @@
D2printf("ECompMgrRepaint rootBuffer=%#lx rootPicture=%#lx\n",
rootBuffer, rootPicture);
- if (EventDebug(EDBUG_TYPE_COMPMGR3))
+ if (EventDebug(EDBUG_TYPE_COMPMGR))
ERegionShow("allDamage", region);
if (!rootBuffer)
@@ -2148,6 +2135,8 @@
return;
Conf_compmgr.enable = Mode_compmgr.active = 1;
+ EGrabServer();
+
pa.subwindow_mode = IncludeInferiors;
pictfmt = XRenderFindVisualFormat(disp, VRoot.vis);
rootPicture =
@@ -2186,10 +2175,12 @@
ECompMgrWinMap(lst[i]);
}
-#if 0 /* FIXME - Remove? */
+#if !USE_BG_WIN_ON_ALL_DESKS
DesksBackgroundRefresh(NULL);
- _ECM_SET_CLIP_CHANGED();
#endif
+ _ECM_SET_CLIP_CHANGED();
+ EUngrabServer();
+ ESync();
}
static void
@@ -2202,6 +2193,8 @@
return;
Conf_compmgr.enable = Mode_compmgr.active = 0;
+ EGrabServer();
+
if (rootPicture)
XRenderFreePicture(disp, rootPicture);
rootPicture = None;
@@ -2243,9 +2236,11 @@
EventCallbackUnregister(VRoot.win, 0, ECompMgrHandleRootEvent, NULL);
-#if 0 /* FIXME - Remove? */
+#if !USE_BG_WIN_ON_ALL_DESKS
DesksBackgroundRefresh(NULL);
#endif
+ EUngrabServer();
+ ESync();
}
void
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs