|
mod_tile 0.9.1
Renders map tiles with Mapnik and serves them using Apache HTTP Server
|
#include "protocol.h"Go to the source code of this file.
Classes | |
| struct | item |
| Node representing a queued or active metatile render request in the scheduler. More... | |
Enumerations | |
| enum | queueEnum { queueRequest , queueRequestPrio , queueRequestBulk , queueDirty , queueRender , queueDuplicate , queueRequestLow } |
| Priority queues and lifecycle states tracked by the render request scheduler. More... | |
Functions | |
| void * | render_thread (void *) |
| Worker thread entry point that initializes per-thread Mapnik instances and processes render requests. | |
| struct item * | fetch_request (void) |
| void | delete_request (struct item *item) |
| void | render_init (const char *plugins_dir, const char *font_dir, int font_recurse) |
| Initialize global Mapnik datasource plugins and FreeType fonts. | |
| enum queueEnum |
Priority queues and lifecycle states tracked by the render request scheduler.
| Enumerator | |
|---|---|
| queueRequest | Standard interactive tile render queue (cmdRender). |
| queueRequestPrio | High-priority interactive tile render queue (cmdRenderPrio). |
| queueRequestBulk | Bulk/batch tile render queue (cmdRenderBulk). |
| queueDirty | Background dirty-tile re-render queue (cmdDirty). |
| queueRender | Active rendering state (dequeued and currently being rendered by a worker thread). |
| queueDuplicate | Coalesced duplicate request linked onto an existing in-flight or queued struct item. |
| queueRequestLow | Low-priority interactive tile render queue (cmdRenderLow). |
| void delete_request | ( | struct item * | item | ) |
| struct item * fetch_request | ( | void | ) |
| void render_init | ( | const char * | plugins_dir, |
| const char * | font_dir, | ||
| int | font_dir_recurse ) |
Initialize global Mapnik datasource plugins and FreeType fonts.
Must be called once during renderd startup before spawning worker threads.
| plugins_dir | Directory path containing Mapnik input datasource plugins (.input). |
| font_dir | Directory path containing font files for Mapnik's FreeType engine. |
| font_dir_recurse | Non-zero to recursively load fonts from subdirectories of font_dir. |
| void * render_thread | ( | void * | arg | ) |
Worker thread entry point that initializes per-thread Mapnik instances and processes render requests.
Each worker thread maintains its own xmlmapconfig array (because mapnik::Map is not safe for concurrent rendering across threads). After loading all configured XML stylesheets and storage backends, the thread loops indefinitely pulling items from render_request_queue, rendering metatiles, saving them to storage, optionally sending HTCP cache purges, and replying to the requesting client.
| arg | Pointer to the shared array of xmlconfigitem definitions (XMLCONFIGS_MAX elements). |