[compiz] [PATCH]Make wobbly's bezier patch to work with grids
that aren't 4x4.
David Reveman
davidr at novell.com
Wed May 2 18:40:24 EEST 2007
On Wed, 2007-05-02 at 01:02 +0300, Roi Cohen wrote:
> This patch is not supposed to make bezierPatchEvaluate any slower than
> it is right now for 4x4 grids.
> 4x4 grid is hard-coded anyway (but inside a define), and this patch
> will just make it possible to people who want to hack this plugin to
> make bigger grids (of course, bigger grids will affect performance).
> So this patch actually doesn't change anything, but the "correctness"
> of this function, and also shouldn't have any performance affect.
You're adding branching, two loops, calls to 'pow' function and a bunch
of divisions to a function that is often executed many thousand times
per second. It's not obvious to me that this wont have a performance
impact.
I understand that it's a correction fix but removing those GRID defines
and making it obvious that the code is hard-coded to 4x4 and not
allowing it to be changed is just as correct. As your testing proved
that changing it to anything but 4x4 doesn't make much sense, I find
this more appropriate as we don't have to worry about the possible
performance impact those changes might have to bezierPatchEvaluate.
- David
More information about the compiz
mailing list