Review Request 126980: Scale blurbehind and backgroundcontrast besides translating

Thomas Lübking thomas.luebking at gmail.com
Wed Feb 3 21:43:11 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126980/#review92037
-----------------------------------------------------------




effects/backgroundcontrast/contrast.cpp (line 379)
<https://git.reviewboard.kde.org/r/126980/#comment62793>

    QPoint pt = shape.boundingRect().topLeft();
    
    rather than calling boundingRect() tiwce.



effects/backgroundcontrast/contrast.cpp (line 381)
<https://git.reviewboard.kde.org/r/126980/#comment62792>

    you don't have to (and should not) re-assign the value, the returned reference if for building call chains like t.scale().translate().map()



effects/backgroundcontrast/contrast.cpp (line 382)
<https://git.reviewboard.kde.org/r/126980/#comment62794>

    This looks fishy - and QTransform a tiny bit clumsy.
    
    Does this work:
    
    QVector shapeRects = shape.rects();
    shape = QRegion(); // clear
    foreach (QRect r, shapeRects) {
       r.moveTo(r.x() * data.xScale() + data.xTranslation(),
                r.y() * data.yScale() + data.yTranslation());
       r.setWidth(r.width() * data.xScale());
       r.setHeight(r.height() * data.yScale());
       shape |= r;
    }
    
    the multiplications might need to be put into qRound or qCeil to avoid glitches.
    
    This spares several qregion copies, conversions into and out of painter paths and the second shape translation.


- Thomas Lübking


On Feb. 3, 2016, 3:35 p.m., Marco Martin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126980/
> -----------------------------------------------------------
> 
> (Updated Feb. 3, 2016, 3:35 p.m.)
> 
> 
> Review request for kwin and Plasma.
> 
> 
> Repository: kwin
> 
> 
> Description
> -------
> 
> related to https://git.reviewboard.kde.org/r/126968/
> this is only the part which adds support for scaled windows to blur and contrast
> 
> 
> Diffs
> -----
> 
>   effects/backgroundcontrast/contrast.cpp 168deb0 
>   effects/blur/blur.cpp a360f03 
> 
> Diff: https://git.reviewboard.kde.org/r/126980/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Marco Martin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160203/0928525b/attachment.html>


More information about the Plasma-devel mailing list