source: subversion/applications/utils/mod_tile/gen_tile.h @ 28681

Last change on this file since 28681 was 17688, checked in by apmon, 10 years ago

[mod_tile / renderd] Add two more priority levels into the queues of renderd

In addition to the request queue and the dirty queue, there are now also a requestPrio and requestBulk queue.
The rendering order now is first render requests from requestPrio, then from request followed by the
dirty queue and finally if no other requests are queued, render from the requestBulk queue.

RequestPrio?, Request and RequestBulk? all block, whereas Diry immediately returns with NotDoneYet?.

This also changes mod_tile to submit requests that if not rendered in time would result in 404 errors as high priority.

prioBulk should be useful for things like rerendering all the outdated tiles in the background, but this patch
does not include those changes.

File size: 867 bytes
Line 
1#ifndef GEN_TILE_H
2#define GEN_TILE_H
3
4#include "protocol.h"
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10#define HTCP_EXPIRE_CACHE 1
11#define HTCP_EXPIRE_CACHE_PORT "4827"
12
13enum queueEnum {queueRequest, queueRequestPrio, queueRequestBulk, queueDirty, queueRender,  queueDuplicate};
14
15struct item {
16    struct item *next;
17    struct item *prev;
18    struct protocol req;
19    int mx, my;
20    int fd;
21    struct item *duplicates;
22    enum queueEnum inQueue;
23};
24
25struct item_idx {
26    struct item_idx *next;
27    struct item *item;
28};
29
30//int render(Map &m, int x, int y, int z, const char *filename);
31void *render_thread(void *);
32struct item *fetch_request(void);
33void delete_request(struct item *item);
34void send_response(struct item *item, enum protoCmd);
35void render_init(const char *plugins_dir, const char* font_dir, int font_recurse);
36
37#ifdef __cplusplus
38}
39#endif
40
41#endif
Note: See TracBrowser for help on using the repository browser.