X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Ftexture-manager-impl.h;h=89afd47ef9540b9a313b20d10f515ed9972569bc;hb=cc2f88a5667c1a0cd19e6fd4756bb50d55128889;hp=c3cd015d739ee8bef02eafd8754ae1aac3daf3ab;hpb=3a2dfe800fe4ec8214f42b28b3851ea8b8ffc72b;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/visuals/texture-manager-impl.h b/dali-toolkit/internal/visuals/texture-manager-impl.h old mode 100755 new mode 100644 index c3cd015..89afd47 --- a/dali-toolkit/internal/visuals/texture-manager-impl.h +++ b/dali-toolkit/internal/visuals/texture-manager-impl.h @@ -27,6 +27,7 @@ #include #include #include +#include // INTERNAL INCLUDES #include @@ -75,7 +76,7 @@ public: /** * Whether the pixel data should be kept in TextureManager, returned with pixelBuffer or uploaded for rendering */ - enum StorageType + enum class StorageType: uint8_t { KEEP_PIXEL_BUFFER, RETURN_PIXEL_BUFFER, @@ -85,7 +86,7 @@ public: /** * Whether the texture should be loaded synchronously or asynchronously. */ - enum LoadType + enum class LoadType: uint8_t { LOAD_ASYNCHRONOUSLY, LOAD_SYNCHRONOUSLY @@ -94,7 +95,7 @@ public: /** * @brief The LoadState Enumeration represents the current state of a particular Texture's life-cycle. */ - enum LoadState + enum class LoadState: uint8_t { NOT_STARTED, ///< Default LOADING, ///< Loading has been started, but not finished. @@ -159,7 +160,7 @@ public: /** * Destructor. */ - ~TextureManager(); + ~TextureManager() override; // TextureManager Main API: @@ -426,6 +427,15 @@ public: */ void SetBrokenImageUrl(const std::string& brokenImageUrl); + /** + * @brief Returns the geometry associated with texture. + * @param[in] textureId Id of the texture + * @param[out] frontElements number of front elements + * @param[out] backElements number of back elements + * @return Returns valid geometry object + */ + Geometry GetRenderGeometry(TextureId textureId, uint32_t& frontElements, uint32_t& backElements ); + private: /** @@ -520,10 +530,10 @@ private: hash( hash ), scaleFactor( scaleFactor ), referenceCount( 1u ), - loadState( NOT_STARTED ), + loadState( LoadState::NOT_STARTED ), fittingMode( fittingMode ), samplingMode( samplingMode ), - storageType( UPLOAD_TO_TEXTURE ), + storageType( StorageType::UPLOAD_TO_TEXTURE ), animatedImageLoading( animatedImageLoading ), frameIndex( frameIndex ), loadSynchronously( loadSynchronously ), @@ -553,10 +563,10 @@ private: TextureManager::TextureHash hash; ///< The hash used to cache this Texture float scaleFactor; ///< The scale factor to apply to the Texture when masking int16_t referenceCount; ///< The reference count of clients using this Texture - LoadState loadState:4; ///< The load state showing the load progress of the Texture + LoadState loadState; ///< The load state showing the load progress of the Texture FittingMode::Type fittingMode:3; ///< The requested FittingMode Dali::SamplingMode::Type samplingMode:3; ///< The requested SamplingMode - StorageType storageType:2; ///< CPU storage / GPU upload; + StorageType storageType; ///< CPU storage / GPU upload; Dali::AnimatedImageLoading animatedImageLoading; ///< AnimatedImageLoading that contains animated image information. uint32_t frameIndex; ///< frame index that be loaded, in case of animated image bool loadSynchronously:1; ///< True if synchronous loading was requested @@ -690,6 +700,14 @@ private: void UploadTexture( Devel::PixelBuffer& pixelBuffer, TextureInfo& textureInfo ); /** + * Creates tiled geometry of for the texture which separates fully-opaque + * tiles from ones which use transparency. + * @param pixelBuffer + * @param textureInfo + */ + bool CreateTiledGeometry( const Devel::PixelBuffer& pixelBuffer, TextureInfo& textureInfo ); + + /** * Mark the texture as complete, and inform observers * @param[in] textureInfo The struct associated with this Texture */