[compiz] [PATCH]Make wobbly's bezier patch to work with grids
that aren't 4x4.
David Reveman
davidr at novell.com
Wed May 2 00:37:27 EEST 2007
On Thu, 2007-04-26 at 17:30 +0300, Roi Cohen wrote:
> Hi,
>
> Recently, I started taking a look at wobbly's source (I was interested
> in it's physics... ;-))
> I noticed that GRID_WIDTH and GRID_HEIGHT were defined to be 4, and I
> wanted to see how the physics look like with grid sizes that aren't
> 4x4.
> I changed the defines to my new grid size, but unfortunately it didn't work.
> I investigated this "bug" (it's not exactly a bug because users can't
> change the grid size), and found out the bezier patch was written for
> specifically 4x4 grids.
> The attached patch makes the bezier patch to work on every grid size
> defined (grid sizes could even be an option, although i think 4x4
> indeed gives the best effect).
I think the bezierPatchEvaluate function that your patch modifies is one
of the most CPU intensive functions that exist in the fdo compiz
plugins. Hence, I'm concerned about how this patch affects performance.
As the 4x4 grid still gives best results it might be better to just
remove those defines from the top of the file and add a comment about
the code being hard-coded to a grid size of 4x4.
- David
More information about the compiz
mailing list