X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fgraphics%2Fgles-impl%2Fgles-graphics-texture.h;h=2ae566ffbda7d6ab7bf539eb941ebaf067fd3e48;hb=17bf836806d3ae9365002d8d1d4bc281a3e0bc9d;hp=dc7d921069a8fae5c5dd9abae3cdef255844f5a1;hpb=4196aa2061de354373c78a29a2dbaae3ab0099e6;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/graphics/gles-impl/gles-graphics-texture.h b/dali/internal/graphics/gles-impl/gles-graphics-texture.h index dc7d921..2ae566f 100644 --- a/dali/internal/graphics/gles-impl/gles-graphics-texture.h +++ b/dali/internal/graphics/gles-impl/gles-graphics-texture.h @@ -26,10 +26,12 @@ // INTERNAL INCLUDES #include "gles-graphics-resource.h" +#include "gles-graphics-types.h" namespace Dali::Graphics::GLES { using TextureResource = Resource; +class Sampler; /** * The Texture class represents a GPU texture object. It's slightly @@ -65,6 +67,15 @@ public: } /** + * @brief Returns the type of the bound Gl texture + * @return The type of the bound Gl texture + */ + [[nodiscard]] BoundTextureType GetTextureTypeId() const + { + return mCreateInfo.nativeImagePtr ? BoundTextureType::TEXTURE_EXTERNAL_OES : static_cast(mCreateInfo.textureType); + } + + /** * @brief Called when initializing the resource * * @return True on success @@ -136,7 +147,19 @@ public: return mIsCompressed; } + void SetSamplerParameter(uint32_t param, uint32_t& cacheValue, uint32_t value) const; + private: + mutable struct SamplerStateCache + { + uint32_t minFilter{0}; + uint32_t magFilter{0}; + uint32_t wrapS{0}; + uint32_t wrapT{0}; + uint32_t wrapR{0}; + uint32_t maxLevel{0}; + } mDefaultSamplerState; + std::vector mStagingBuffer; uint32_t mTextureId{0u}; GLenum mGlTarget{0u};