[Pixman] [PATCH v9 03/15] pixman-image: Added enable-gnuplot config to view filters in gnuplot
Bill Spitzak
spitzak at gmail.com
Mon Feb 1 09:36:23 PST 2016
On Mon, Feb 1, 2016 at 6:10 AM, Oded Gabbay <oded.gabbay at gmail.com> wrote:
>
> > - params = pixman_filter_create_separable_convolution (
> > - &n_params,
> > - sx * 65536.0 + 0.5,
> > - sy * 65536.0 + 0.5,
> > - get_value (app, filters, "reconstruct_x_combo_box"),
> > - get_value (app, filters, "reconstruct_y_combo_box"),
> > - get_value (app, filters, "sample_x_combo_box"),
> > - get_value (app, filters, "sample_y_combo_box"),
> > - gtk_adjustment_get_value (app->subsample_adjustment),
> > - gtk_adjustment_get_value (app->subsample_adjustment));
> > + if (get_value (app, filter_types, "filter_combo_box") ==
> > + PIXMAN_FILTER_SEPARABLE_CONVOLUTION)
> > + {
> > + params = pixman_filter_create_separable_convolution (
> > + &n_params,
> > + sx * 65536.0 + 0.5,
> > + sy * 65536.0 + 0.5,
> > + get_value (app, filters, "reconstruct_x_combo_box"),
> > + get_value (app, filters, "reconstruct_y_combo_box"),
> > + get_value (app, filters, "sample_x_combo_box"),
> > + get_value (app, filters, "sample_y_combo_box"),
> > + gtk_adjustment_get_value (app->subsample_adjustment),
> > + gtk_adjustment_get_value (app->subsample_adjustment));
> > + }
> > + else
> > + {
> > + params = 0;
> > + n_params = 0;
> > + }
>
> Wait, what the above code has to do with this patch ?
> It wasn't in the previous version (v7) and I don't see how it is
> related to the gnuplot.
> This seems like a fix to the demo code.
> If what I said is correct, please split it into a different patch.
>
I had to patch it so it did not run the filter generator twice when set to
good/best, otherwise the plot flashed back and forth annoyingly.
But this also makes the demo a bit faster showing accurately the speed at
which transforms are done, so I think putting this in an earlier patch is a
good idea.
> +#if PIXMAN_GNUPLOT
>
> To keep consistency with other defines checks, please use #ifdef when
> checking just one define
>
OK
> > @@ -346,5 +387,9 @@ out:
> > free (horz);
> > free (vert);
> >
> > +#if PIXMAN_GNUPLOT
>
> To keep consistency with other defines checks, please use #ifdef when
> checking just one define
>
> > + gnuplot_filter(width, subsample_x, params+4);
> > +#endif
> > +
>
> What's the point in printing the filter after the out: label ?
> You can get here in cases where there were errors in the function.
> Why not put the call to gnuplot_filter() just before the out: label ?
>
You are correct it should only do this on success. My mistake.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pixman/attachments/20160201/a56b800d/attachment-0001.html>
More information about the Pixman
mailing list