[Mesa-dev] [Bug 89586] Drivers/DRI/swrast
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Mar 16 01:36:58 PDT 2015
https://bugs.freedesktop.org/show_bug.cgi?id=89586
--- Comment #6 from Dan Sebald <daniel.sebald at ieee.org> ---
One last comment about the efficiency of the pixel zooming. This routine seems
slow when I rescale the image; it's tolerable, but could be faster. There is a
setup of the memory addresses and context for every row of the image written to
the frame buffer. malloc() is used every row as well.
I think things could be simplified if in s_drawpix.c a single big memory buffer
is first created and these routines that "write" spans could be changed to
simply "fill" the big memory buffer. That would avoid the setting up of the
frame buffer memory for each row. Instead, it would just be an extra tight
loop inside SPAN_LOOP_X() that copies r1-r0-1 rows. Then after the big buffer
is filled with the image (pretty much the same loop as is currently done for
writing), then use the fast image write routine. That would then be just one
malloc(), filled buffer piecewise, write to frame buffer, free().
To get an accurate pixel size for the zoomed image, put the declaration
static GLboolean
compute_zoomed_bounds(struct gl_context *ctx, GLint imageX, GLint imageY,
GLint spanX, GLint spanY, GLint spanWidth,
GLint *x0, GLint *x1, GLint *y0, GLint *y1)
in s_zoom.h. With the changes made in the attached changeset, that routine
should be very accurate with something like
compute_zoomed_bounds(ctx, imageX, imageY, 0, 0, imageX, &x0, &x1, &y0, &y1);
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150316/b8eddf6c/attachment.html>
More information about the mesa-dev
mailing list