| 201 | } |
| 202 | |
| 203 | void SymbolsTexture::Load(ref_ptr<dp::GraphicsContext> context, std::string const & skinPathName, |
| 204 | ref_ptr<HWTextureAllocator> allocator) |
| 205 | { |
| 206 | auto definitionInserter = [this](std::string const & name, m2::RectF const & rect) |
| 207 | { m_definition.insert(std::make_pair(name, SymbolsTexture::SymbolInfo(rect))); }; |
| 208 | |
| 209 | auto completionHandler = [this, &allocator, context](unsigned char * data, uint32_t width, uint32_t height) |
| 210 | { |
| 211 | Texture::Params p; |
| 212 | p.m_allocator = allocator; |
| 213 | p.m_format = dp::TextureFormat::RGBA8; |
| 214 | p.m_width = width; |
| 215 | p.m_height = height; |
| 216 | |
| 217 | Create(context, p, make_ref(data)); |
| 218 | }; |
| 219 | |
| 220 | auto failureHandler = [this, context](std::string const & reason) |
| 221 | { |
| 222 | LOG(LERROR, (reason)); |
| 223 | Fail(context); |
| 224 | }; |
| 225 | |
| 226 | LoadSymbols(skinPathName, m_name, true /* convertToUV */, definitionInserter, completionHandler, failureHandler); |
| 227 | } |
| 228 | |
| 229 | void SymbolsTexture::Invalidate(ref_ptr<dp::GraphicsContext> context, std::string const & skinPathName, |
| 230 | ref_ptr<HWTextureAllocator> allocator) |
nothing calls this directly
no test coverage detected