Drop support for explicit contents opacity from WindowPaintData
No effect has ever made use of contents opacity. Which means it is not needed. Removing means faster effects as we used to multiply the value (always 1.0) with the opacity in each frame for each window.
This commit is contained in:
parent
be3cfb06d0
commit
f723f132ca
4 changed files with 4 additions and 7 deletions
|
@ -394,9 +394,9 @@ void BlurEffect::drawWindow(EffectWindow *w, int mask, QRegion region, WindowPai
|
|||
|
||||
if (!shape.isEmpty()) {
|
||||
if (m_shouldCache && !translated) {
|
||||
doCachedBlur(w, region, data.opacity * data.contents_opacity);
|
||||
doCachedBlur(w, region, data.opacity);
|
||||
} else {
|
||||
doBlur(shape, screen, data.opacity * data.contents_opacity);
|
||||
doBlur(shape, screen, data.opacity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -208,7 +208,6 @@ void PaintData::setRotationOrigin(const QVector3D &origin)
|
|||
WindowPaintData::WindowPaintData(EffectWindow* w)
|
||||
: PaintData()
|
||||
, opacity(w->opacity())
|
||||
, contents_opacity(1.0)
|
||||
, decoration_opacity(1.0)
|
||||
, saturation(1)
|
||||
, brightness(1)
|
||||
|
@ -220,7 +219,6 @@ WindowPaintData::WindowPaintData(EffectWindow* w)
|
|||
WindowPaintData::WindowPaintData(const WindowPaintData &other)
|
||||
: PaintData()
|
||||
, opacity(other.opacity)
|
||||
, contents_opacity(other.contents_opacity)
|
||||
, decoration_opacity(other.decoration_opacity)
|
||||
, saturation(other.saturation)
|
||||
, brightness(other.brightness)
|
||||
|
|
|
@ -1864,7 +1864,6 @@ public:
|
|||
* way for decoration.
|
||||
*/
|
||||
double opacity;
|
||||
double contents_opacity;
|
||||
double decoration_opacity;
|
||||
/**
|
||||
* Saturation of the window, in range [0; 1]
|
||||
|
|
|
@ -573,9 +573,9 @@ void SceneOpenGL::Window::performPaint(int mask, QRegion region, WindowPaintData
|
|||
WindowQuadList contentQuads = data.quads.select(WindowQuadContents);
|
||||
if (!contentQuads.empty()) {
|
||||
texture.bind();
|
||||
prepareStates(Content, data.opacity * data.contents_opacity, data.brightness, data.saturation, data.shader);
|
||||
prepareStates(Content, data.opacity, data.brightness, data.saturation, data.shader);
|
||||
renderQuads(mask, region, contentQuads, &texture, false, hardwareClipping);
|
||||
restoreStates(Content, data.opacity * data.contents_opacity, data.brightness, data.saturation, data.shader);
|
||||
restoreStates(Content, data.opacity, data.brightness, data.saturation, data.shader);
|
||||
texture.unbind();
|
||||
#ifndef KWIN_HAVE_OPENGLES
|
||||
if (static_cast<SceneOpenGL*>(scene)->debug) {
|
||||
|
|
Loading…
Reference in a new issue