[Tizen] Change GetTextureProperties
[platform/core/uifw/dali-adaptor.git] / dali / internal / graphics / gles-impl / gles-graphics-texture.h
index 2ae566f..8da8d2c 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_GRAPHICS_GLES_TEXTURE_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -129,12 +129,14 @@ public:
   /**
    * @param pData  Input data
    * @param sizeInBytes Size of the input data in bytes
-   * @param width  Width of the output buffer
-   * @param height height of the output buffer
+   * @param inStride Stride of the input data.
+   * @param width Width of the input/output buffer
+   * @param height Height of the intput/output buffer
    * @param outputBuffer The buffer to write to
+   * @note output Buffer will be packed without stride.
    * @return true if converted, or false otherwise
    */
-  bool TryConvertPixelData(const void* pData, Graphics::Format srcFormat, Graphics::Format destFormat, uint32_t sizeInBytes, uint32_t width, uint32_t height, std::vector<uint8_t>& outputBuffer);
+  bool TryConvertPixelData(const void* pData, Graphics::Format srcFormat, Graphics::Format destFormat, uint32_t sizeInBytes, uint32_t inStride, uint32_t width, uint32_t height, std::vector<uint8_t>& outputBuffer);
 
   bool InitializeNativeImage();
 
@@ -142,13 +144,22 @@ public:
 
   Format ValidateFormat(Format sourceFormat);
 
-  bool IsCompressed()
+  bool IsCompressed() const
   {
     return mIsCompressed;
   }
 
   void SetSamplerParameter(uint32_t param, uint32_t& cacheValue, uint32_t value) const;
 
+  uint32_t GetDependencyIndex() const
+  {
+    return mDependencyIndex;
+  }
+  void SetDependencyIndex(uint32_t dependencyIndex)
+  {
+    mDependencyIndex = dependencyIndex;
+  }
+
 private:
   mutable struct SamplerStateCache
   {
@@ -160,10 +171,11 @@ private:
     uint32_t maxLevel{0};
   } mDefaultSamplerState;
 
-  std::vector<char> mStagingBuffer;
+  std::vector<char> mStagingBuffer{};
   uint32_t          mTextureId{0u};
   GLenum            mGlTarget{0u};
   uint32_t          mMaxMipMapLevel{0u};
+  uint32_t          mDependencyIndex{0xFFFFFFFF};
   void*             mGLOwnerContext{nullptr};
   bool              mIsCompressed{false};
 };