[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kimageshop
Subject: Re: About the experimental paintop optimization
From: "LukasT.dev () gmail ! com" <lukast ! dev () gmail ! com>
Date: 2010-12-26 21:29:44
Message-ID: 201012262229.44147.LukasT.dev () gmail ! com
[Download RAW message or body]
Hello,
On Sunday 26 December 2010 16:10:13 Dmitry Kazakov wrote:
> Hi, all!
>
> I guess this paintop can be greatly optimized. When you move your mouse,
> the only region changed is contained inside the borders of the rectangle
> formed by the points:
>
> (base_point, prev_point, current_point),
>
> where base_point - is the point, where the stroke has been started,
> current_point - the point passed from mouseMoveEvent,
> prev_point - the point passed from the previous mouseMoveEvent.
>
>
> So we needn't to repaint the whole stroke. We need to update this triangle
> only. Lukas said, that the generation of the polygon is done using
> QPainter, but i think this is hardly a problem. We can generate the whole
> mask with a QPainter, then split the triangle into a couple of rectangles.
> Then we have to copy these only these few rectangles into
> KisFixedPaintDevice, paint them onto the destination device, and call
> setDirty for them. I think this will be much faster and efficient.
Go for it! I'm not sure if I get it.
I wrote that paintop and I tend to avoid this kind of optimizations from the
start as I like the code to be simple as much as possible.
_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic