Ignore:
Timestamp:
Mar 8, 2010, 12:52:58 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.2 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/image/qpixmapdata.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    4646#include <private/qgraphicssystem_p.h>
    4747#include <private/qapplication_p.h>
     48#include <private/qimagepixmapcleanuphooks_p.h>
    4849
    4950QT_BEGIN_NAMESPACE
     
    8182QPixmapData::~QPixmapData()
    8283{
     84    // Sometimes the pixmap cleanup hooks will be called from derrived classes, which will
     85    // then set is_cached to false. For example, on X11 QtOpenGL needs to delete the GLXPixmap
     86    // or EGL Pixmap Surface for a given pixmap _before_ the native X11 pixmap is deleted,
     87    // otherwise some drivers will leak the GL surface. In this case, QX11PixmapData will
     88    // call the cleanup hooks itself before deleting the native pixmap and set is_cached to
     89    // false.
     90    if (is_cached) {
     91        QImagePixmapCleanupHooks::executePixmapDataDestructionHooks(this);
     92        is_cached = false;
     93    }
    8394}
    8495
Note: See TracChangeset for help on using the changeset viewer.