Negative plugin causes incorrect alpha blending ( a(1+x)+bx instead of a(1-x)+bx )

Bug #1257223 reported by Povilas Kanapickas
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Compiz
Fix Released
Medium
Povilas Kanapickas
compiz (Ubuntu)
Fix Released
Medium
Povilas Kanapickas

Bug Description

When the opacity of a negative window (that is, one for which negative plugin is activated) is reduced, it causes the compositor to blend it incorrectly: instead of the usual blending function of a(1-x)+bx (here x is alpha), a(1+x)+bx is used. This causes the window area to become almost completely white in certain cases.

Compiz version: rev. 3806.

I think I could fix this bug myself, but I'm not familiar with the compiz codebase enough. Maybe someone could hint me where the actual compositing is implemented? This would save a lot of time for me.

Related branches

Povilas Kanapickas (p12)
summary: - Negative plugin causes incorrect alpha blending ( (1+x)a+bx instead of
- (1-x)a+bx )
+ Negative plugin causes incorrect alpha blending ( a(1+x)+bx instead of
+ a(1-x)+bx )
description: updated
description: updated
Revision history for this message
MC Return (mc-return) wrote :

Probably you would find what you need in plugins/composite/*

plugins/composite/src/window.cpp might be a candidate.

Revision history for this message
MC Return (mc-return) wrote :

The actual calculations are done via glsl Fragment Shader in PrivateShaderCache::createFragmentShader (const GLShaderParameters &params) -> opengl/src/shadercache.cpp.

Hope that helps ;)

MC Return (mc-return)
Changed in compiz:
milestone: none → 0.9.11.0
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:compiz at revision None, scheduled for release in compiz, milestone 0.9.11.0

Changed in compiz:
status: Triaged → Fix Committed
Changed in compiz (Ubuntu):
status: New → In Progress
Changed in compiz:
assignee: nobody → Povilas Kanapickas (p12)
Changed in compiz (Ubuntu):
importance: Undecided → Medium
assignee: nobody → Povilas Kanapickas (p12)
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (44.6 KiB)

This bug was fixed in the package compiz - 1:0.9.11+14.04.20140214-0ubuntu1

---------------
compiz (1:0.9.11+14.04.20140214-0ubuntu1) trusty; urgency=low

  [ Timo Jyrinki ]
  * Bump version to 0.9.11

  [ Marco Trevisan (Treviño) ]
  * debian/00_remove_decor_in_unity_session.py: add migration script
    to avoid to load the decor plugin on compiz startup when using unity.
  * debian/compiz-gnome.gconf-defaults: disable decor plugin on unity session

  [ Sebastien Bacher ]
  * debian/compiz-gnome.links: lists keybinding in unity-control-center
  * typo fix in the previous commit. (LP: #1271710)

  [ Iven Hsu ]
  * Opacify: Only dim the windows above the active window.(LP:
    #1189374). (LP: #1189374)
  * KWD: Fix compile errors with KDE 4.11. The KWin developers made
    kdecorationbridge.h private. See:
    http://lists.freedesktop.org/archives/compiz/2013-March/003479.html
    (LP: #1193792). (LP: #1193792)

  [ Nikolay Martynov ]
  * When static switcher is enabled and has an option to show
    application icon turned on the icons are expected to be ~1/3 of a
    thumbnail (48px). Instead they are displayed in 512px size and
    completely cover everything. This change addresses this issue. See
    LP #1173914. (LP: #1173914, #1186426)

  [ BryanFRitt ]
  * Fixed the non-working Annotate 'Clear' Button. Moved this option's
    CCSM position upwards to keep the button shortcuts together. (LP:
    #1202907). (LP: #1202907)

  [ CI bot ]
  * Flush trunk to Ubuntu

  [ William Hua ]
  * Replace <Primary> with <Control> in CCSM. Fixes
    https://bugs.launchpad.net/compiz/+bug/1069121. (LP: #1069121)
  * Tweak support of key bindings of the form
    '<Modifier>Modifier_KeySym'. We tweak a bit the behaviour of key
    bindings such as '<Control>Shift_L' and '<Alt>Alt_R'. 1. We ignore
    the order of key pressing and releasing, so tapping
    '<Shift>Control_L' is the same as '<Control>Shift_L'. 2. We properly
    handle the double modifiers case, for example '<Control>Control_R'.
    3. We also parse key bindings with '<Primary>' being equivalent to
    '<Control>'.
  * Fix GSettings tests with extra slash.
  * Add an interface for plugins to provide non-option key actions that
    can be triggered.

  [ Eleni Maria Stea ]
  * It fixes the bug #1245886. In DecorScreen::handleEvent compiz
    shouldn't try to handle any events if there's no active window yet.
    (LP: #1245886)
  * Compiz static analysis shows that some compiz classes have virtual
    methods but not virtual destructors. Added the virtual destructors
    to get rid of warnings and potential memory leaks.
  * fixed cmake syntax errors.
  * CMake considered compiz a C++ project and couldn't find some
    dependencies like pthreads. Defined compiz as a C, CXX project to
    fix the issue.

  [ Povilas Kanapickas ]
  * Opacify: Properly initialize window drawing for new windows in
    Opacify plugin. (LP: #787814, part 2). (LP: #787814)
  * Opacify: Fix damage generation in the Opacify plugin. When setting
    opacity to some value, non-opacified windows need to be damaged
    regardless of opacity, whereas opacified windows need to be damaged
    only if opacity changes. Remove u...

Changed in compiz (Ubuntu):
status: In Progress → Fix Released
Stephen M. Webb (bregma)
Changed in compiz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.