Disable copying by value for GLTexture, as it wouldn't work anyway.
CCMAIL: Rivo Laks <rivolaks@hot.ee> svn path=/trunk/KDE/kdebase/workspace/; revision=805056
This commit is contained in:
parent
6142ecbfe0
commit
b840fa0792
3 changed files with 9 additions and 7 deletions
|
@ -1033,15 +1033,14 @@ void PresentWindowsEffect::paintWindowIcon( EffectWindow* w, WindowPaintData& pa
|
|||
}
|
||||
|
||||
WindowData& data = mWindowData[ w ];
|
||||
// TODO: find out why this doesn't work properly
|
||||
// if( data.icon.cacheKey() != w->icon().cacheKey())
|
||||
if( data.icon.cacheKey() != w->icon().cacheKey())
|
||||
{ // make sure data.icon is the right QPixmap, and rebind
|
||||
data.icon = w->icon();
|
||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
||||
if( effects->compositingType() == OpenGLCompositing )
|
||||
{
|
||||
data.iconTexture.load( data.icon );
|
||||
data.iconTexture.setFilter( GL_LINEAR );
|
||||
data.iconTexture = new GLTexture( data.icon );
|
||||
data.iconTexture->setFilter( GL_LINEAR );
|
||||
}
|
||||
#endif
|
||||
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
||||
|
@ -1071,7 +1070,7 @@ void PresentWindowsEffect::paintWindowIcon( EffectWindow* w, WindowPaintData& pa
|
|||
// Render the icon
|
||||
glColor4f( 1, 1, 1, 1 * mActiveness );
|
||||
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
data.iconTexture.bind();
|
||||
data.iconTexture->bind();
|
||||
const float verts[ 4 * 2 ] =
|
||||
{
|
||||
x, y,
|
||||
|
@ -1087,7 +1086,7 @@ void PresentWindowsEffect::paintWindowIcon( EffectWindow* w, WindowPaintData& pa
|
|||
1, 1
|
||||
};
|
||||
renderGLGeometry( 4, verts, texcoords );
|
||||
data.iconTexture.unbind();
|
||||
data.iconTexture->unbind();
|
||||
glPopAttrib();
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -118,7 +118,7 @@ class PresentWindowsEffect
|
|||
int slot_distance;
|
||||
QPixmap icon;
|
||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
||||
GLTexture iconTexture;
|
||||
KSharedPtr< GLTexture > iconTexture;
|
||||
#endif
|
||||
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
||||
Picture iconPicture;
|
||||
|
|
|
@ -30,6 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include <QtGui/QImage>
|
||||
#include <QtCore/QSize>
|
||||
#include <QtCore/QSharedData>
|
||||
|
||||
/** @addtogroup kwineffects */
|
||||
/** @{ */
|
||||
|
@ -103,6 +104,7 @@ KWIN_EXPORT void renderRoundBoxWithEdge( const QRect& area, float roundness = 10
|
|||
|
||||
|
||||
class KWIN_EXPORT GLTexture
|
||||
: public QSharedData
|
||||
{
|
||||
public:
|
||||
GLTexture();
|
||||
|
@ -159,6 +161,7 @@ class KWIN_EXPORT GLTexture
|
|||
static bool mNPOTTextureSupported;
|
||||
static bool mFramebufferObjectSupported;
|
||||
static bool mSaturationSupported;
|
||||
Q_DISABLE_COPY( GLTexture )
|
||||
};
|
||||
|
||||
class KWIN_EXPORT GLShader
|
||||
|
|
Loading…
Reference in a new issue