22.8 Render Flags

Every device has a set of render flags (a simple int, in which bits can be set or cleared).

These flags tend to have meanings specific to individual devices. In an ideal world they would not be required, but having this mechanism here can provide noticeable quality improvements.

void fz_render_flags(fz_context *ctx, fz_device *dev, int set, int clear);

The function basically does:

flags = (flags | set) & ~clear;

That is to say, the bits given in set are set, and then the bits given in clear are cleared.

The current only documented use of this is for the GProof device to request the Draw device to grid fit its tiled images.

The reason for using Render Flags rather than Device Hints (see section 9.4 Device Hints) is that Render Flags can be carried forward though display lists.