Ticket #7238: 7238-v1.patch

File 7238-v1.patch, 2.2 KB (added by danielk, 11 years ago)
  • libs/libmythui/mythpainter_vdpau.cpp

     
    379379        curOutput,
    380380        &dummy
    381381    );
    382     CHECK_ST
     382    CHECK_ST;
    383383
    384     if (m_surfaceDeleteList.size())
     384    QMutexLocker locker(&m_surfaceDeleteLock);
     385    while (!m_surfaceDeleteList.empty())
    385386    {
    386         m_surfaceDeleteLock.lock();
    387         while (m_surfaceDeleteList.size())
    388         {
    389             VdpBitmapSurface bitmap = m_surfaceDeleteList.front();
    390             m_surfaceDeleteList.pop_front();
    391 
    392             vdp_bitmap_surface_destroy(bitmap);
    393         }
    394         m_surfaceDeleteLock.unlock();
     387        VdpBitmapSurface bitmap = m_surfaceDeleteList.front();
     388        m_surfaceDeleteList.pop_front();
     389        vdp_bitmap_surface_destroy(bitmap);
    395390    }
    396391}
    397392
  • libs/libmythui/mythpainter_ogl.cpp

     
    55// Config header generated in base directory by configure
    66#include "config.h"
    77
    8 // C/C++ headers
    9 #include <math.h>
     8// C headers
     9#include <cmath>
    1010
     11// C++ headers
     12#include <vector>
     13using namespace std;
     14
    1115// QT headers
    1216#include <QApplication>
    1317#include <QPixmap>
     
    9397        return;
    9498    }
    9599
    96     if (m_textureDeleteList.size())
     100    vector<GLuint> textures;
    97101    {
    98         GLuint textures[1];
    99 
    100         m_textureDeleteLock.lock();
    101         while (m_textureDeleteList.size())
     102        QMutexLocker locker(&m_textureDeleteLock);
     103        while (!m_textureDeleteList.empty())
    102104        {
    103             textures[0] = m_textureDeleteList.front();
     105            textures.push_back(m_textureDeleteList.front());
    104106            m_textureDeleteList.pop_front();
    105 
    106             glDeleteTextures(1, textures);
    107107        }
    108         m_textureDeleteLock.unlock();
    109108    }
     109    glDeleteTextures(textures.size(), &textures[0]);
    110110
    111 
    112111    realParent->makeCurrent();
    113112    glClearColor(0.0, 0.0, 0.0, 0.0);
    114113    glClear(GL_COLOR_BUFFER_BIT);