diff options
| author | Sam Spilsbury <sam.spilsbury@canonical.com> | 2012-08-30 16:06:38 +0800 |
|---|---|---|
| committer | Sam Spilsbury <sam.spilsbury@canonical.com> | 2012-08-30 16:06:38 +0800 |
| commit | ae133514ba0e60dc8170211d50129b90f77a76de (patch) | |
| tree | 83c861bdc2007218f3aad1be0052ebf64e7f39ba /plugins/unity-mt-grab-handles | |
| parent | a011109f609567c48ef3c54f04f3d22f544da004 (diff) | |
Remove usage of USE_MODERN_COMPIZ_GL bump the compiz dep
(bzr r2637.6.1)
Diffstat (limited to 'plugins/unity-mt-grab-handles')
| -rw-r--r-- | plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.cpp | 39 | ||||
| -rw-r--r-- | plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.h | 4 |
2 files changed, 5 insertions, 38 deletions
diff --git a/plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.cpp b/plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.cpp index ad840204c..d737e406e 100644 --- a/plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.cpp +++ b/plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.cpp @@ -438,29 +438,19 @@ UnityMTGrabHandlesWindow::getOutputExtents(CompWindowExtents& output) bool UnityMTGrabHandlesWindow::glDraw(const GLMatrix& transform, -#ifdef USE_MODERN_COMPIZ_GL const GLWindowPaintAttrib& attrib, -#else - GLFragment::Attrib& fragment, -#endif const CompRegion& region, unsigned int mask) { /* Draw the window on the bottom, we will be drawing the * handles on top */ -#ifdef USE_MODERN_COMPIZ_GL bool status = gWindow->glDraw(transform, attrib, region, mask); -#else - bool status = gWindow->glDraw(transform, fragment, region, mask); -#endif if (mHandles && mHandles->visible()) { unsigned int allowedHandles = unity::MT::getLayoutForMask (window->state (), window->actions ()); unsigned int handle = 0; - UMTGH_SCREEN (screen); - for(unity::MT::TextureLayout layout : mHandles->layout (allowedHandles)) { /* We want to set the geometry of the handle to the window @@ -472,17 +462,11 @@ UnityMTGrabHandlesWindow::glDraw(const GLMatrix& transform, GLTexture::MatrixList matl; GLTexture::Matrix mat = tex->matrix(); CompRegion paintRegion(region); -#ifdef USE_MODERN_COMPIZ_GL GLWindowPaintAttrib wAttrib(attrib); -#endif /* We can reset the window geometry since it will be * re-added later */ -#ifdef USE_MODERN_COMPIZ_GL gWindow->vertexBuffer()->begin(); -#else - gWindow->geometry().reset(); -#endif /* Not sure what this does, but it is necessary * (adjusts for scale?) */ @@ -498,35 +482,22 @@ UnityMTGrabHandlesWindow::glDraw(const GLMatrix& transform, * dim (so we get a nice render for things like * wobbly etc etc */ gWindow->glAddGeometry(matl, reg, paintRegion); -#ifdef USE_MODERN_COMPIZ_GL - gWindow->vertexBuffer()->end(); - wAttrib.opacity = mHandles->opacity(); -#else - /* Did it succeed? */ - if (gWindow->geometry().vertices) - { - fragment.setOpacity(mHandles->opacity()); - /* Texture rendering set-up */ - us->gScreen->setTexEnvMode(GL_MODULATE); -#endif + + if (gWindow->vertexBuffer()->end()) + { + wAttrib.opacity = mHandles->opacity(); + glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); /* Draw the dim texture with all of it's modified * geometry glory */ gWindow->glDrawTexture(tex, -#ifdef USE_MODERN_COMPIZ_GL transform, wAttrib, -#else - fragment, -#endif mask | PAINT_WINDOW_BLEND_MASK | PAINT_WINDOW_TRANSLUCENT_MASK | PAINT_WINDOW_TRANSFORMED_MASK); /* Texture rendering tear-down */ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); -#ifndef USE_MODERN_COMPIZ_GL - us->gScreen->setTexEnvMode(GL_REPLACE); } -#endif } handle++; diff --git a/plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.h b/plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.h index 9cd99b9d1..f0d3776e5 100644 --- a/plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.h +++ b/plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.h @@ -229,11 +229,7 @@ public: void moveNotify(int dx, int dy, bool immediate); bool glDraw(const GLMatrix&, -#ifdef USE_MODERN_COMPIZ_GL const GLWindowPaintAttrib&, -#else - GLFragment::Attrib&, -#endif const CompRegion&, unsigned int); |
