[gs-devel] beginpage and the vector device

Ralph Giles ralph.giles at artifex.com
Fri Nov 2 10:35:15 PDT 2007

On Fri, Nov 02, 2007 at 09:35:48AM -0700, Ray Johnston wrote:

> As Ken mentioned, the "logical" start of a page is when the page
> is first marked with non-white (actually non-background). Along
> with the DSC comments that Ken mentioned that may be caught and
> processed (with the ProcessDSCComments proc), many PS files will
> perform several 'setpagedevice' actions at the beginning of the
> page, each of which erases the page (calls the zfillpage func).

Ok, that's what I thought. Thanks both of you for clarifying.

> One efficient method for a device to catch the first marking
> operation is to hook all of the device marking procedures to
> one set of routines that signals 'page has been marked', then
> after performing the start of page stuff, set all of the
> procedures to the regular procs. This avoids performance penalty
> once the page is marked.

Ok. I think this is a worthwhile idea. The pxl driver currently tests 
on all marks anyway, so moving that test to gdevvec.c makes no 
difference, but I suppose my suggestion could slow down devices like 
pdfwrite that accumulate changes before writing things out. Should
probably benchmark it first though.


More information about the gs-devel mailing list