Bug 303314

Summary: Refactor Screen/Window PaintData
Product: [Plasma] kwin Reporter: Martin Flöser <mgraesslin>
Component: compositingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: task Flags: mgraesslin: ReviewRequest+
Priority: NOR    
Version: 4.8.90   
Target Milestone: 4.10   
Platform: unspecified   
OS: Linux   
URL: https://git.reviewboard.kde.org/r/105141/
Latest Commit: Version Fixed In: 4.10
Bug Depends on:    
Bug Blocks: 303313    

Description Martin Flöser 2012-07-10 15:51:42 UTC
Screen/WindowPaintData is showing two real issues:
1. it has public members which are read/written everywhere
2. it uses double for translation/scale/opacity/brightness

These two issues can be addressed by refactoring the classes to have a sane API and using qreal everywhere. This will make it easier to have the final conversion to float just in one place.
Comment 1 Martin Flöser 2012-07-19 16:29:57 UTC
Git commit 8d6f6b3f3f73d67f955c1335a05a672d6cc994bf by Martin Gräßlin.
Committed on 12/07/2012 at 17:20.
Pushed by graesslin into branch 'master'.

Getter/setters for opacity, saturation and brightness in WindowPaintData

The public member variables for opacity, saturation and brightness
are removed in favor for getter and setters. The variables are
moved into a private class. Those are now qreal instead of double.

To make usage inside the effects easier a multiply method is added
which multiplies the current value with passed in factor and returns
the new value in a functional programming style.

This commit is the top-most of a patch series to refactor
ScreenPaintData and WindowPaintData. Other related commits are:
* 0811772
* ebdc7ec
* 2c8dd8d
* 7699726
* 68e0201
* 611cb09

REVIEW: 105141
FIXED-IN: 4.10

M  +2    -2    kwin/effects/blur/blur.cpp
M  +2    -2    kwin/effects/boxswitch/boxswitch.cpp
M  +11   -11   kwin/effects/coverswitch/coverswitch.cpp
M  +1    -1    kwin/effects/cube/cube.cpp
M  +2    -2    kwin/effects/cube/cubeslide.cpp
M  +3    -5    kwin/effects/dashboard/dashboard.cpp
M  +4    -4    kwin/effects/desktopgrid/desktopgrid.cpp
M  +2    -2    kwin/effects/dialogparent/dialogparent.cpp
M  +2    -2    kwin/effects/diminactive/diminactive.cpp
M  +2    -2    kwin/effects/dimscreen/dimscreen.cpp
M  +1    -1    kwin/effects/explosion/explosion.cpp
M  +15   -15   kwin/effects/flipswitch/flipswitch.cpp
M  +1    -1    kwin/effects/glide/glide.cpp
M  +1    -1    kwin/effects/highlightwindow/highlightwindow.cpp
M  +4    -4    kwin/effects/login/login.cpp
M  +10   -10   kwin/effects/logout/logout.cpp
M  +1    -1    kwin/effects/minimizeanimation/minimizeanimation.cpp
M  +6    -6    kwin/effects/presentwindows/presentwindows.cpp
M  +1    -1    kwin/effects/scalein/scalein.cpp
M  +2    -2    kwin/effects/taskbarthumbnail/taskbarthumbnail.cpp
M  +1    -1    kwin/effects/thumbnailaside/thumbnailaside.cpp
M  +11   -11   kwin/effects/translucency/translucency.cpp
M  +13   -13   kwin/lanczosfilter.cpp
M  +3    -3    kwin/libkwineffects/kwinanimationeffect.cpp
M  +87   -8    kwin/libkwineffects/kwineffects.cpp
M  +65   -6    kwin/libkwineffects/kwineffects.h
M  +2    -2    kwin/scene.cpp
M  +6    -6    kwin/scene_opengl.cpp
M  +6    -6    kwin/scene_xrender.cpp
M  +95   -2    kwin/tests/test_window_paint_data.cpp

http://commits.kde.org/kde-workspace/8d6f6b3f3f73d67f955c1335a05a672d6cc994bf