mod_tile 0.9.1
Renders map tiles with Mapnik and serves them using Apache HTTP Server
Loading...
Searching...
No Matches
gen_tile.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007 - 2026 by mod_tile contributors (see AUTHORS file)
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; If not, see http://www.gnu.org/licenses/.
16 */
17
18#ifndef GEN_TILE_H
19#define GEN_TILE_H
20
21#include "protocol.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
46
50 struct item {
52 struct item *next;
54 struct item *prev;
56 struct protocol req;
58 int mx, my;
60 int fd;
67 };
68
69 // int render(Map &m, int x, int y, int z, const char *filename);
70 void *render_thread(void *);
71 struct item *fetch_request(void);
72 void delete_request(struct item *item);
73 void render_init(const char *plugins_dir, const char *font_dir, int font_recurse);
74
75#ifdef __cplusplus
76}
77#endif
78
79#endif /* GEN_TILE_H */
void delete_request(struct item *item)
queueEnum
Priority queues and lifecycle states tracked by the render request scheduler.
Definition gen_tile.h:30
@ queueRequestLow
Low-priority interactive tile render queue (cmdRenderLow).
Definition gen_tile.h:44
@ queueRequestBulk
Bulk/batch tile render queue (cmdRenderBulk).
Definition gen_tile.h:36
@ queueRequestPrio
High-priority interactive tile render queue (cmdRenderPrio).
Definition gen_tile.h:34
@ queueRequest
Standard interactive tile render queue (cmdRender).
Definition gen_tile.h:32
@ queueDirty
Background dirty-tile re-render queue (cmdDirty).
Definition gen_tile.h:38
@ queueRender
Active rendering state (dequeued and currently being rendered by a worker thread).
Definition gen_tile.h:40
@ queueDuplicate
Coalesced duplicate request linked onto an existing in-flight or queued struct item.
Definition gen_tile.h:42
void render_init(const char *plugins_dir, const char *font_dir, int font_recurse)
Initialize global Mapnik datasource plugins and FreeType fonts.
Definition gen_tile.cpp:442
void * render_thread(void *)
Worker thread entry point that initializes per-thread Mapnik instances and processes render requests.
Definition gen_tile.cpp:461
struct item * fetch_request(void)
Node representing a queued or active metatile render request in the scheduler.
Definition gen_tile.h:50
int my
Definition gen_tile.h:58
struct protocol req
Wire protocol request payload (cmd, x, y, z, xmlname, options, etc.).
Definition gen_tile.h:56
enum queueEnum inQueue
Current queue or state (queueRender, queueDuplicate, etc.) containing this item.
Definition gen_tile.h:64
int mx
Metatile-aligned base X and Y coordinates (x & ~(METATILE - 1), y & ~(METATILE - 1)).
Definition gen_tile.h:58
int fd
Client socket file descriptor awaiting completion notification (FD_INVALID if none).
Definition gen_tile.h:60
struct item * next
Next item in the doubly linked priority queue list.
Definition gen_tile.h:52
enum queueEnum originatedQueue
Original priority queue into which this request was initially submitted.
Definition gen_tile.h:66
struct item * duplicates
Singly linked list of duplicate requests coalesced onto this metatile job.
Definition gen_tile.h:62
struct item * prev
Previous item in the doubly linked priority queue list.
Definition gen_tile.h:54
Version 3 wire protocol message packet (PROTO_VER == 3).
Definition protocol.h:89