mirror of
https://github.com/openstreetmap/mod_tile.git
synced 2025-07-25 15:04:30 +00:00

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.
42 lines
867 B
C
42 lines
867 B
C
#ifndef GEN_TILE_H
|
|
#define GEN_TILE_H
|
|
|
|
#include "protocol.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define HTCP_EXPIRE_CACHE 1
|
|
#define HTCP_EXPIRE_CACHE_PORT "4827"
|
|
|
|
enum queueEnum {queueRequest, queueRequestPrio, queueRequestBulk, queueDirty, queueRender, queueDuplicate};
|
|
|
|
struct item {
|
|
struct item *next;
|
|
struct item *prev;
|
|
struct protocol req;
|
|
int mx, my;
|
|
int fd;
|
|
struct item *duplicates;
|
|
enum queueEnum inQueue;
|
|
};
|
|
|
|
struct item_idx {
|
|
struct item_idx *next;
|
|
struct item *item;
|
|
};
|
|
|
|
//int render(Map &m, int x, int y, int z, const char *filename);
|
|
void *render_thread(void *);
|
|
struct item *fetch_request(void);
|
|
void delete_request(struct item *item);
|
|
void send_response(struct item *item, enum protoCmd);
|
|
void render_init(const char *plugins_dir, const char* font_dir, int font_recurse);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|