Support YUV decoding for JPEG
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / image / image-visual.h
index bf9b64b..307ab19 100644 (file)
@@ -224,11 +224,6 @@ protected:
   void OnSetTransform() override;
 
   /**
-   * @copydoc Visual::Base::IsResourceReady
-   */
-  bool IsResourceReady() const override;
-
-  /**
    * @copydoc Visual::Base::UpdateShader
    */
   void UpdateShader() override;
@@ -304,12 +299,29 @@ private:
   void RemoveTexture();
 
   /**
+   * @brief Compute texture size
+   */
+  void ComputeTextureSize();
+
+  /**
+   * @brief Compute mask texture ratio
+   * @return The Mask Texture Ratio
+   */
+  Vector2 ComputeMaskTextureRatio();
+
+  /**
    * Helper method to set individual values by index key.
    * @param[in] index The index key of the value
    * @param[in] value The value
    */
   void DoSetProperty(Property::Index index, const Property::Value& value);
 
+  /**
+   * @brief Check whether the mask texture is loaded or not.
+   * If MaskingType is MASKING_ON_LOADING and mask texture is failed to load, update shader.
+   */
+  void CheckMaskTexture();
+
 private:
   Vector4                            mPixelArea;
   WeakHandle<Actor>                  mPlacementActor;
@@ -319,6 +331,7 @@ private:
   Dali::ImageDimensions     mDesiredSize;
   TextureManager::TextureId mTextureId;
   TextureSet                mTextures;
+  Vector2                   mTextureSize;
 
   ImageVisualShaderFactory& mImageVisualShaderFactory;
 
@@ -333,6 +346,7 @@ private:
   TextureManager::LoadState                       mLoadState;             ///< The texture loading state
   bool                                            mAttemptAtlasing;       ///< If true will attempt atlasing, otherwise create unique texture
   bool                                            mOrientationCorrection; ///< true if the image will have it's orientation corrected.
+  bool                                            mNeedYuvToRgb{false};   ///< true if we need to convert yuv to rgb.
 };
 
 } // namespace Internal