D15735: [effects/wobblywindows] Optimize wobbly windows effect

Vlad Zagorodniy <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
zzag added inline comments.

INLINE COMMENTS

> anthonyfieroni wrote in wobblywindows.cpp:60-136
> Why that's optimization.

This should go in another patch.

> wobblywindows.cpp:306
> +    QHash< const EffectWindow*,  WindowWobblyInfos >::const_iterator it;
> +    if (!(mask & PAINT_SCREEN_TRANSFORMED) && (it = windows.find(w)) != windows.end()) {
> +        const WindowWobblyInfos& wwi = it.value();

Please use constFind/constEnd.

> wobblywindows.cpp:712-714
> -    if (wwi.status == Closing) {
> -        rect = wwi.closeRect;
> -    }

Can you please clarify why you deleted this one? Shouldn't we pass closeRect as rect in paintWindow, e.g.:

  const QRectF rect = wwi.status == Closing ? wwi.closeRect : w->geometry();

?

> wobblywindows.h:201-211
> -
> -    void initWobblyInfo(WindowWobblyInfos& wwi, QRect geometry) const;
> -    void freeWobblyInfo(WindowWobblyInfos& wwi) const;
> -    void wobblyOpenInit(WindowWobblyInfos& wwi) const;
> -    void wobblyCloseInit(WindowWobblyInfos& wwi, EffectWindow* w) const;
> -
> -    WobblyWindowsEffect::Pair computeBezierPoint(const WindowWobblyInfos& wwi, Pair point) const;

Please leave them here. (Move them up in a patch that does code cleanup)

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D15735

To: anthonyfieroni, #kwin, zzag
Cc: romangg, kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.