Make reference count as signed integer 89/301689/1
authorEunki, Hong <eunkiki.hong@samsung.com>
Tue, 21 Nov 2023 23:15:19 +0000 (08:15 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Tue, 21 Nov 2023 23:15:19 +0000 (08:15 +0900)
Since the reference count can be negative if CANCEL cases, we should keep it
as signed integer value

(The patch https://review.tizen.org/gerrit/c/platform/core/uifw/dali-toolkit/+/300487 change as wrong integer type)

Change-Id: I297b587bea7afb3b7bf2a83d4a0de8ab9b373713
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali-toolkit/internal/texture-manager/texture-cache-manager.h
dali-toolkit/internal/texture-manager/texture-manager-type.h

index d4d6ea6d71e1acf9a1e03e9c1a3c6d9a1696a36c..03075f4200e3a628653a36c68d0b9f90b56e1d0c 100644 (file)
@@ -306,13 +306,13 @@ private:
     : bufferId(bufferId),
       bufferHash(bufferHash),
       encodedImageBuffer(encodedImageBuffer),
-      referenceCount(1u)
+      referenceCount(1)
     {
     }
     TextureCacheManager::TextureId   bufferId;
     TextureCacheManager::TextureHash bufferHash;
     EncodedImageBuffer               encodedImageBuffer;
-    uint32_t                         referenceCount;
+    int32_t                          referenceCount;
   };
 
   typedef Dali::FreeList TextureIdConverterType; ///< The converter type from TextureId to index of TextureInfoContainer.
index a81d761fc1feffda101c710eff7847d0049fc6cb..75a2478103a4e4953a312f3548e1100dd632a850 100644 (file)
@@ -234,7 +234,7 @@ struct TextureInfo
     maskTextureId(maskTextureId),
     hash(hash),
     scaleFactor(scaleFactor),
-    referenceCount(1u),
+    referenceCount(1),
     loadState(LoadState::NOT_STARTED),
     fittingMode(fittingMode),
     samplingMode(samplingMode),
@@ -268,7 +268,7 @@ struct TextureInfo
   TextureId                  maskTextureId;        ///< The mask TextureId to be applied on load
   TextureHash                hash;                 ///< The hash used to cache this Texture
   float                      scaleFactor;          ///< The scale factor to apply to the Texture when masking
-  uint32_t                   referenceCount;       ///< The reference count of clients using this Texture
+  int32_t                    referenceCount;       ///< The reference count of clients using this Texture
   LoadState                  loadState;            ///< The load state showing the load progress of the Texture
   Dali::FittingMode::Type    fittingMode : 3;      ///< The requested FittingMode
   Dali::SamplingMode::Type   samplingMode : 3;     ///< The requested SamplingMode
@@ -297,14 +297,14 @@ struct ExternalTextureInfo
                       const bool        preMultiplied)
   : textureId(textureId),
     textureSet(textureSet),
-    referenceCount(1u),
+    referenceCount(1),
     preMultiplied(preMultiplied)
   {
   }
 
   TextureId  textureId;         ///< The TextureId associated with this ExternalTexture
   TextureSet textureSet;        ///< The external texture
-  uint32_t   referenceCount;    ///< The reference count of clients using this ExternalTexture
+  int32_t    referenceCount;    ///< The reference count of clients using this ExternalTexture
   bool       preMultiplied : 1; ///< True if the image's color was multiplied by it's alpha
 };