116 bool PrepareTexture(
int base_level,
const wxRect &rect,
117 ColorScheme color_scheme,
int mem_used);
119 ColorScheme color_scheme);
120 bool UpdateCacheAllLevels(
const wxRect &rect, ColorScheme color_scheme,
121 unsigned char **compcomp_array,
int *compcomp_size);
122 bool IsLevelInCache(
int level,
const wxRect &rect, ColorScheme color_scheme);
123 wxString GetChartPath() {
return m_ChartPath; }
124 wxString GetHashKey() {
return m_HashKey; }
125 void SetHashKey(wxString key) { m_HashKey = key; }
127 void AccumulateMemStatistics(
int &map_size,
int &comp_size,
129 void DeleteTexture(
const wxRect &rect);
130 void DeleteAllTextures(
void);
131 void DeleteSomeTextures(
long target);
132 void DeleteAllDescriptors(
void);
133 bool BackgroundCompressionAsJob()
const;
134 void PurgeBackgroundCompressionPool();
135 void SetLRUTime(
int lru) { m_LRUtime = lru; }
136 int GetLRUTime() {
return m_LRUtime; }
137 void FreeSome(
long target);
147 void GetCenter(
double &lat,
double &lon) { lat = m_clat, lon = m_clon; }
150 bool LoadCatalog(
void);
151 bool LoadHeader(
void);
152 bool WriteCatalogAndHeader();
154 bool UpdateCachePrecomp(
unsigned char *data,
int data_size,
155 const wxRect &rect,
int level,
156 ColorScheme color_scheme,
bool write_catalog =
true);
157 bool UpdateCacheLevel(
const wxRect &rect,
int level, ColorScheme color_scheme,
158 unsigned char *data,
int size);
163 ColorScheme color_scheme);
165 int ArrayIndex(
int x,
int y)
const {
166 return ((y / m_tex_dim) * m_stride) + (x / m_tex_dim);
168 void ArrayXY(wxRect *r,
int index)
const;
170 int n_catalog_entries;
174 wxString m_ChartPath;
176 wxString m_CompressedCacheFilePath;
178 int m_catalog_offset;
183 bool m_catalogCorrupted;
186 uint32_t m_chart_date_binary;
187 uint32_t m_chartfile_date_binary;
188 uint32_t m_chartfile_size;
202 double m_clat, m_clon;
204 int m_prepared_projection_type;