mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-14 12:04:29 +00:00
loader: removed loader finding for LoaderMgr::loader(data, w, h, copy)
LoaderMgr::loader(data, w, h, copy) is dedicated for raw images only. No need to try other loaders.
This commit is contained in:
parent
dc7bb0deed
commit
a4a323929f
1 changed files with 5 additions and 6 deletions
|
@ -173,12 +173,11 @@ shared_ptr<LoadModule> LoaderMgr::loader(const char* data, uint32_t size, bool c
|
||||||
|
|
||||||
shared_ptr<LoadModule> LoaderMgr::loader(const uint32_t *data, uint32_t w, uint32_t h, bool copy)
|
shared_ptr<LoadModule> LoaderMgr::loader(const uint32_t *data, uint32_t w, uint32_t h, bool copy)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < static_cast<int>(FileType::Unknown); i++) {
|
//function is dedicated for raw images only
|
||||||
auto loader = _find(static_cast<FileType>(i));
|
auto loader = _find(static_cast<FileType>(FileType::Raw));
|
||||||
if (loader) {
|
if (loader) {
|
||||||
if (loader->open(data, w, h, copy)) return shared_ptr<LoadModule>(loader);
|
if (loader->open(data, w, h, copy)) return shared_ptr<LoadModule>(loader);
|
||||||
else delete(loader);
|
else delete(loader);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue