Repository navigation
ppd-generator: drop the broken URF default resolution check - #98
Conversation
|
Note: "printer-resolution-supported" and "printer-resolution-default" are DIFFERENT from "urf-supported" and "pwg-raster-document-resolution-supported". "printer-resolution" refers to the print engine capabilities, while "urf-supported" and "pwg-raster-document-resolution-supported" refer to the raster processor's capabilities when preparing a source document for printing on the printer. In almost all cases, sending 1200dpi raster data to a 1200dpi printer is a waste of bandwidth since the printer must dither/halftone the source document based on the print engine. |
the loop compared current_def to a newly allocated resolution, so it compared pointers and never matched, and it used the outer loop index. the result was always the middle resolution, and it leaked memory on every pass. the middle resolution is the right default anyway, since printer-resolution-default is about the print engine and not the raster data. so just use it and remove the loop. no change to the generated PPD.
e071657 to
a79edcf
Compare
|
Thanks, that makes sense, I hadn't thought about the print engine vs the raster data! Sending 1200dpi raster to the printer just to honor that default would be a waste. So I dropped that part: the PPD keeps the middle resolution like it does today, and this now just removes the broken check and the leak that came with it. |
the URF default resolution check in
ppdCreatePPDFromIPP2()could never match. it comparedcurrent_defto a freshly allocatedcfNewResolution()so it was comparing pointers, it usedresArray[i]insted of[j], and it leaked on every pass. the default always ended up as the middle resolution.this first tried to make the loop honor
printer-resolution-default, but as Michael pointed out that's about the print engine and not the raster data, so the middle resolution is the better default. now it just uses that and the loop is gone, so the generated PPD doesn't change and only the leak goes away. the comment is updated to match.added a case to
test_ppd_generatorthat pins the 600dpi result. it passes on top of master with #96.