[PATCH 20/20] dix: reduce scope of tmp and mult.

Peter Hutterer peter.hutterer at who-t.net
Mon May 9 18:56:11 PDT 2011


On Sun, May 08, 2011 at 03:16:38PM +0200, Simon Thum wrote:
> On 05/03/2011 03:00 AM, Peter Hutterer wrote:
> > Some more documentation would have helped, I found it hard to get the big
> > picture in my head even with the wiki page. There are too many details that
> > weren't clear immediately and having what's in your brain about the accel
> > methods backed up somewhere would be a benefit :)
> I could surely add some more doc comments, but beyond that I'll have to
> rely on some pointer what exactly might have helped you.
> 
> For example, the direction/octant field is something I bet has no
> simpler counterpart, but I can understand if people fail to see what it
> is for anyway. But you seem to have grasped it, so I don't know whether
> it's documented good or bad?

Now that I understand those parts better, it's hard for me to come up with
places where to add documentation. The few things that I think could
possibl need documentation are:

Trackers? what are they, why are they reset to 0?

ComputeAcceleration takes the 6 velocity factors, but why?
this is one of the things that were confusing. I looked at the code, but it
explains what it does, not why it does so.  Guess I should have googled for
Simpons's rule earlier too.

Direction was what threw me off. It's quite prominent in the code but the
actual use of it is one line. The documentation for that line could
probably be simply as "direction changed octant, skip the rest"

Looking at other people's code is a bit like looking at a painting through a
straw. You see a tiny part of it and it's hard to see everything.
On the plus side, the chance that there's drinking involved soon is
quite high.

Cheers,
  Peter


More information about the xorg-devel mailing list