From fa49ea063652afb7d4d169d26cb3f2d7f9f07025 Mon Sep 17 00:00:00 2001 From: seungho Date: Thu, 18 Nov 2021 17:20:08 +0900 Subject: [PATCH] [Tizen] Make do not support animated webp - Current WebP do not support cache even it is single frame static image - This patch temporarilly block to use animated webp so that any kind of webp file well be loaded by image visual when the case of ImageView. Change-Id: Ie5a1000842a8a9b0c8cd5b9f469e2894b4c178f5 Signed-off-by: seungho --- dali-toolkit/internal/visuals/visual-url.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dali-toolkit/internal/visuals/visual-url.cpp b/dali-toolkit/internal/visuals/visual-url.cpp index 0ad5778..e8700cb 100644 --- a/dali-toolkit/internal/visuals/visual-url.cpp +++ b/dali-toolkit/internal/visuals/visual-url.cpp @@ -116,13 +116,13 @@ VisualUrl::Type ResolveType(const std::string& url) } state = SUFFIX; char SVG[4] = {'g', 'v', 's', '.'}; char GIF[4] = {'f', 'i', 'g', '.'}; - char WEBP[5] = {'p', 'b', 'e', 'w', '.'}; + //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 tvgScore = 0; unsigned int gifScore = 0; - unsigned int webpScore = 0; + //unsigned int webpScore = 0; unsigned int jsonScore = 0; int index = count; while(--index >= 0) @@ -153,14 +153,14 @@ VisualUrl::Type ResolveType(const std::string& url) return VisualUrl::GIF; } } - if((offsetFromEnd < sizeof(WEBP)) && (currentChar == WEBP[offsetFromEnd])) - { - // early out if WEBP as can't be used in N patch for now - if(++webpScore == sizeof(WEBP)) - { - return VisualUrl::WEBP; - } - } + //if((offsetFromEnd < sizeof(WEBP)) && (currentChar == WEBP[offsetFromEnd])) + //{ + // // early out if WEBP as can't be used in N patch for now + // if(++webpScore == sizeof(WEBP)) + // { + // return VisualUrl::WEBP; + // } + //} if((offsetFromEnd < sizeof(JSON)) && (currentChar == JSON[offsetFromEnd])) { // early out if JSON as can't be used in N patch for now -- 2.7.4