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
Merge "Add text selection popup style" into devel/master
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
visuals
/
visual-url.h
diff --git
a/dali-toolkit/internal/visuals/visual-url.h
b/dali-toolkit/internal/visuals/visual-url.h
index
a772bd1
..
941d0b8
100644
(file)
--- a/
dali-toolkit/internal/visuals/visual-url.h
+++ b/
dali-toolkit/internal/visuals/visual-url.h
@@
-2,7
+2,7
@@
#define DALI_TOOLKIT_INTERNAL_VISUAL_URL_H
/*
#define DALI_TOOLKIT_INTERNAL_VISUAL_URL_H
/*
- * Copyright (c) 202
1
Samsung Electronics Co., Ltd.
+ * Copyright (c) 202
2
Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-38,14
+38,16
@@
public:
SVG,
GIF,
WEBP,
SVG,
GIF,
WEBP,
- JSON
+ JSON,
+ TVG
};
enum ProtocolType
{
LOCAL, ///< file in local file system
TEXTURE, ///< texture uploaded to texture manager
};
enum ProtocolType
{
LOCAL, ///< file in local file system
TEXTURE, ///< texture uploaded to texture manager
- REMOTE ///< remote image
+ REMOTE, ///< remote image
+ BUFFER ///< encoded image buffer
};
/**
};
/**
@@
-88,6
+90,12
@@
public:
const std::string& GetUrl() const;
/**
const std::string& GetUrl() const;
/**
+ * Get the hash value of full URL
+ * @return The hash value of url
+ */
+ const std::uint64_t& GetUrlHash() const;
+
+ /**
* Get the visual type of the URL
* @return The visual type of the URL
*/
* Get the visual type of the URL
* @return The visual type of the URL
*/
@@
-111,6
+119,11
@@
public:
bool IsLocalResource() const;
/**
bool IsLocalResource() const;
/**
+ * @return true if the location is BUFFER, i.e. may contain EncodedImageBuffer
+ */
+ bool IsBufferResource() const;
+
+ /**
* @return the location part of the url
*/
std::string GetLocation() const;
* @return the location part of the url
*/
std::string GetLocation() const;
@@
-123,6
+136,13
@@
public:
static std::string CreateTextureUrl(const std::string& location);
/**
static std::string CreateTextureUrl(const std::string& location);
/**
+ * Helper to create a URL of type BUFFER
+ * @param location the location of the texture
+ * @return the Url
+ */
+ static std::string CreateBufferUrl(const std::string& location);
+
+ /**
* Helper to get a ProtocolType from url
* @param url the url of the texture
* @return the protocol type
* Helper to get a ProtocolType from url
* @param url the url of the texture
* @return the protocol type
@@
-135,10
+155,13
@@
public:
* @return the location
*/
static std::string GetLocation(const std::string& url);
* @return the location
*/
static std::string GetLocation(const std::string& url);
+
private:
std::string mUrl;
Type mType;
ProtocolType mLocation;
private:
std::string mUrl;
Type mType;
ProtocolType mLocation;
+
+ mutable std::uint64_t mUrlHash;
};
} // namespace Internal
};
} // namespace Internal