diff options
| author | Sam Spilsbury <sam.spilsbury@canonical.com> | 2012-09-07 07:05:34 -0400 |
|---|---|---|
| committer | Tarmac <> | 2012-09-07 07:05:34 -0400 |
| commit | fb21dc7e141a33c0d7ce72c386f181b79922d0e0 (patch) | |
| tree | 78a08dd2bb6ccb89f19032fe36c34302b16f1cdd /plugins/unity-mt-grab-handles | |
| parent | 4776de183ecbcb38ea42bcd2d883136f00f3c981 (diff) | |
| parent | d5893765285fcc917799a8f503cb54fcc3691147 (diff) | |
Remove everything in the #ifndef USE_MODERN_COMPIZ_GL ifdefs and remove the ifdefs alltogether. lp:unity now requires compiz 0.9.8.0 . Also removed ScreenEffectFramebufferObject.. Fixes: . Approved by Omer Akram, Sam Spilsbury, Andrea Azzarone.
(bzr r2669)
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 8807ebc14..e16cb89c3 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); |
