summaryrefslogtreecommitdiff
path: root/src/mtexturepixmapitem_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mtexturepixmapitem_p.cpp')
-rw-r--r--src/mtexturepixmapitem_p.cpp19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/mtexturepixmapitem_p.cpp b/src/mtexturepixmapitem_p.cpp
index 788d867..112a78a 100644
--- a/src/mtexturepixmapitem_p.cpp
+++ b/src/mtexturepixmapitem_p.cpp
@@ -338,33 +338,22 @@ MTexturePixmapPrivate::MTexturePixmapPrivate(Qt::HANDLE window, QGLWidget *w, MT
custom_tfp(false),
direct_fb_render(false),
angle(0),
- damage_object(0),
item(p)
{
- damageTracking(true);
+ if (item->propertyCache())
+ item->propertyCache()->damageTracking(true);
init();
}
MTexturePixmapPrivate::~MTexturePixmapPrivate()
{
- damageTracking(false);
+ if (item->propertyCache())
+ item->propertyCache()->damageTracking(false);
if (windowp)
XFreePixmap(QX11Info::display(), windowp);
}
-void MTexturePixmapPrivate::damageTracking(bool enabled)
-{
- if (damage_object) {
- XDamageDestroy(QX11Info::display(), damage_object);
- damage_object = NULL;
- }
-
- if (enabled && !damage_object && !item->propertyCache()->isInputOnly())
- damage_object = XDamageCreate(QX11Info::display(), window,
- XDamageReportNonEmpty);
-}
-
void MTexturePixmapPrivate::saveBackingStore(bool renew)
{
if ((item->propertyCache()->is_valid && !item->propertyCache()->isMapped())