[compiz] [PATCH]Make wobbly's bezier patch to work with grids that aren't 4x4.

Roi Cohen roico.beryl at gmail.com
Wed May 2 01:02:57 EEST 2007


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.

On 5/2/07, David Reveman <davidr at novell.com> wrote:
> 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