[PATCH 07/15] Replace the motion estimator

Daniel Stone daniel at fooishbar.org
Tue Jun 14 09:02:12 PDT 2011


Hi,

On Tue, Jun 14, 2011 at 02:59:43PM +1000, Peter Hutterer wrote:
> On Thu, Jun 09, 2011 at 08:57:28PM +0100, Daniel Stone wrote:
> > +    /* Determine the best fit line through the 3 most recent history entries */
> > +    for (i = 0; i < MIN(priv->count_packet_finger, 3); i++) {
> > +	ym += HIST(i).y;
> > +	xm += HIST(i).x;
> > +	tm += HIST_DELTA(i, 0, millis);
> 
> you're mixing tabs/spaces here. I'd prefer the code to be tab-indented,
> that's the majority format here.

Oops, I thought I'd caught all these.  As much as I hate four-space
indentation with every eight spaces being a tab - fixed.

> > @@ -1787,10 +1846,11 @@ get_delta(SynapticsPrivate *priv, const struct SynapticsHwState *hw,
> >      double tmpf;
> >      int x_edge_speed = 0;
> >      int y_edge_speed = 0;
> > +    Bool outlier = FALSE;
> >  
> >      /* HIST is full enough: priv->count_packet_finger > 3 */
> 
> this comment now seems to be misplaced

Good point.

> > @@ -1847,19 +1907,19 @@ ComputeDeltas(SynapticsPrivate *priv, const struct SynapticsHwState *hw,
> >      }
> >  
> >      /* to create fluid edge motion, call back 'soon'
> > -     * even in the absence of new hardware events */
> > +     * even in the absence of new hardware events
> > +     * Note: This should be longer that the device report rate!
> > +     */
> >      delay = MIN(delay, POLL_MS);
> 
> sigh, isn't this supposed to be in the POLL_MS patch?

Yep.

> > @@ -2594,7 +2654,7 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now,
> >      priv->lastButtons = buttons;
> >  
> >      /* generate a history of the absolute positions */
> > -    if (inside_active_area)
> > +    if (inside_active_area && actual)
> 
> ooh, look. the actual is actually used now :)

Ha.

> misplaced hunk, should be elsewhere.

Have moved this.

Cheers,
Daniel


More information about the xorg-devel mailing list