projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
image-view: Add tvg image format
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
visuals
/
visual-url.cpp
diff --git
a/dali-toolkit/internal/visuals/visual-url.cpp
b/dali-toolkit/internal/visuals/visual-url.cpp
index
30d9c02
..
0ad5778
100644
(file)
--- a/
dali-toolkit/internal/visuals/visual-url.cpp
+++ b/
dali-toolkit/internal/visuals/visual-url.cpp
@@
-118,7
+118,9
@@
VisualUrl::Type ResolveType(const std::string& url)
char GIF[4] = {'f', 'i', 'g', '.'};
char WEBP[5] = {'p', 'b', 'e', 'w', '.'};
char JSON[5] = {'n', 'o', 's', 'j', '.'};
char GIF[4] = {'f', 'i', 'g', '.'};
char WEBP[5] = {'p', 'b', 'e', 'w', '.'};
char JSON[5] = {'n', 'o', 's', 'j', '.'};
+ char TVG[4] = {'g', 'v', 't', '.'};
unsigned int svgScore = 0;
unsigned int svgScore = 0;
+ unsigned int tvgScore = 0;
unsigned int gifScore = 0;
unsigned int webpScore = 0;
unsigned int jsonScore = 0;
unsigned int gifScore = 0;
unsigned int webpScore = 0;
unsigned int jsonScore = 0;
@@
-135,6
+137,14
@@
VisualUrl::Type ResolveType(const std::string& url)
return VisualUrl::SVG;
}
}
return VisualUrl::SVG;
}
}
+ if((offsetFromEnd < sizeof(TVG)) && (currentChar == TVG[offsetFromEnd]))
+ {
+ // early out if TVG as can't be used in N patch for now
+ if(++tvgScore == sizeof(TVG))
+ {
+ return VisualUrl::TVG;
+ }
+ }
if((offsetFromEnd < sizeof(GIF)) && (currentChar == GIF[offsetFromEnd]))
{
// early out if GIF as can't be used in N patch for now
if((offsetFromEnd < sizeof(GIF)) && (currentChar == GIF[offsetFromEnd]))
{
// early out if GIF as can't be used in N patch for now