summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKimmo Hämäläinen <kimmo.hamalainen@nokia.com>2010-11-29 13:57:31 +0200
committerKimmo Hämäläinen <kimmo.hamalainen@nokia.com>2010-11-29 13:57:31 +0200
commit287f28730e3853d570d4b1c63729f37d4bbeb8c8 (patch)
treeb5364ca813a5481286e7583aa502d3171a887a5a
parent49d731674891e33c838b55cc4da3719886c02b2e (diff)
Changes: Fix build errors on i386/Scratchbox variants
- Further ifdefs to temporarily disable MCompositeWindowGroup on GLX version - Fix crash when stopTimer is invoked on the destructor of a MCompositeWindowGroup item Conflicts: src/mcompositewindow.cpp
-rw-r--r--src/mcompositescene.cpp7
-rw-r--r--src/mcompositewindow.cpp6
-rw-r--r--src/mcompositewindowshadereffect.cpp4
-rw-r--r--src/mtexturepixmapitem_glx.cpp5
-rw-r--r--src/mtexturepixmapitem_p.h2
5 files changed, 22 insertions, 2 deletions
diff --git a/src/mcompositescene.cpp b/src/mcompositescene.cpp
index b0d6c23..de35d80 100644
--- a/src/mcompositescene.cpp
+++ b/src/mcompositescene.cpp
@@ -88,7 +88,12 @@ void MCompositeScene::drawItems(QPainter *painter, int numItems, QGraphicsItem *
for (int i = numItems - 1; i >= 0; --i) {
MCompositeWindow *cw = (MCompositeWindow *) items[i];
- if (cw->type() != MCompositeWindowGroup::Type) {
+#ifdef GLES2_VERSION
+ static int item_type = MCompositeWindowGroup::Type;
+#else
+ static int item_type = QGraphicsItem::Type + 2;
+#endif
+ if (cw->type() != item_type) {
if (!cw->propertyCache()) // this window is dead
continue;
if (cw->hasTransitioningWindow() && cw->propertyCache()->isDecorator())
diff --git a/src/mcompositewindow.cpp b/src/mcompositewindow.cpp
index 3055f8c..9c6cb0e 100644
--- a/src/mcompositewindow.cpp
+++ b/src/mcompositewindow.cpp
@@ -119,7 +119,7 @@ MCompositeWindow::~MCompositeWindow()
MCompositeManager *p = (MCompositeManager *) qApp;
p->d->removeWindow(window());
- if (t_ping) {
+ if (window() && t_ping) {
stopPing();
t_ping = 0;
}
@@ -796,5 +796,9 @@ bool MCompositeWindow::isMapped() const
MCompositeWindowGroup* MCompositeWindow::group() const
{
+#ifdef GLES2_VERSION
return renderer()->current_window_group;
+#else
+ return 0;
+#endif
}
diff --git a/src/mcompositewindowshadereffect.cpp b/src/mcompositewindowshadereffect.cpp
index 16aae02..dc462eb 100644
--- a/src/mcompositewindowshadereffect.cpp
+++ b/src/mcompositewindowshadereffect.cpp
@@ -112,10 +112,14 @@ GLuint MCompositeWindowShaderEffect::texture() const
{
// TODO: This assumes we have always have hadware TFP support
if (d->priv_render) {
+#ifdef GLES2_VERSION
if (!d->priv_render->current_window_group)
return d->priv_render->textureId;
else
return d->priv_render->current_window_group->texture();
+#else
+ return d->priv_render->textureId;
+#endif
}
return 0;
}
diff --git a/src/mtexturepixmapitem_glx.cpp b/src/mtexturepixmapitem_glx.cpp
index 59914ab..249237d 100644
--- a/src/mtexturepixmapitem_glx.cpp
+++ b/src/mtexturepixmapitem_glx.cpp
@@ -401,3 +401,8 @@ void MTexturePixmapItem::clearTexture()
glClearColor(0.0, 0.0, 0.0, 0.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}
+
+MTexturePixmapPrivate* MTexturePixmapItem::renderer() const
+{
+ return d;
+}
diff --git a/src/mtexturepixmapitem_p.h b/src/mtexturepixmapitem_p.h
index eaf4c03..4e8937b 100644
--- a/src/mtexturepixmapitem_p.h
+++ b/src/mtexturepixmapitem_p.h
@@ -88,7 +88,9 @@ public:
MTexturePixmapItem *item;
QPointer<MCompositeWindowShaderEffect> current_effect;
+#ifdef GLES2_VERSION
QPointer<MCompositeWindowGroup> current_window_group;
+#endif
const MCompositeWindowShaderEffect *prev_effect;
// Contains a limited number of server times we received damage