Bug 692632 - clist logic wastes BufferSpace when doing transparency.
Summary: clist logic wastes BufferSpace when doing transparency.
Status: RESOLVED WONTFIX
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Graphics Library (show other bugs)
Version: master
Hardware: All All
: P4 enhancement
Assignee: Ray Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-27 03:37 UTC by Ray Johnston
Modified: 2021-10-12 17:50 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ray Johnston 2011-10-27 03:37:57 UTC
The band_height calculation divides up the BufferSpace into n bands, but when
the page has transparency, the band_height is reduced to try and keep the
pdf14 transparency buffers within the BufferSpace, but since the buffers are
not allocated from the printer device's 'base' memory (BufferSpace size), the
space in the base memory past the reduced band_height is just wasted.

Probably we should free and re-allocate the BufferSpace to the size needed for
the reduced band_height during rendering, then free and reallocate the original
size again after rendering the page. At least this would keep to total RAM
needed closer to what was intended with the BufferSpace parameter and the
pdf14 clist implementation.

This could be a critical issue in an embedded implementation.
Comment 1 Ray Johnston 2018-07-25 21:19:11 UTC
Also, in page mode, we should defer allocating the device's page buffer until
the PDF14_POP_DEVICE does its put_image since it won't be written into until
we use pdf14_put_image to "blit" the pdf14 device's top page buffer into
the device buffer. This allows the transparency stack to be allocated when
there is no full page device buffer, reducing the RAM high water mark.

Also, in page mode, we don't need to clear (fillpage) the device's page buffer
since it will be written ENTIRELY from the pdf14 top page buffer.