X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Ftexture-manager-impl.h;h=6df17c6ed134d9f2ab9681b63ece2bf43c9eae07;hp=8685ec6aa260c764e599052455e7027846ccf16a;hb=fb791c98c1c80ad07a935975c1b9332fada628f8;hpb=c25ab6d22aec336cd938bd186987291517081355 diff --git a/dali-toolkit/internal/visuals/texture-manager-impl.h b/dali-toolkit/internal/visuals/texture-manager-impl.h old mode 100644 new mode 100755 index 8685ec6..6df17c6 --- a/dali-toolkit/internal/visuals/texture-manager-impl.h +++ b/dali-toolkit/internal/visuals/texture-manager-impl.h @@ -175,7 +175,10 @@ public: * @param[in] maskInfo Mask info structure * @param[in] synchronousLoading true if the URL should be loaded synchronously * @param[out] textureId, The textureId of the URL - * @param[out] textureRect The rectangle within the texture atlas that this URL occupies + * @param[out] textureRect The rectangle within the texture atlas that this URL occupies, + * this is the rectangle in normalized coordinates. + * @param[out] textureRectSize The rectangle within the texture atlas that this URL occupies, + * this is the same rectangle in pixels. * @param[in,out] atlasingStatus Set to USE_ATLAS to attempt atlasing. If atlasing fails, the image will still * be loaded, and marked successful, but this will be set to false. * If atlasing succeeds, this will be set to true. @@ -203,6 +206,7 @@ public: bool synchronousLoading, TextureManager::TextureId& textureId, Vector4& textureRect, + Dali::ImageDimensions& textureRectSize, bool& atlasingStatus, bool& loadingStatus, Dali::WrapMode::Type wrapModeU, @@ -307,9 +311,11 @@ public: void Remove( const TextureManager::TextureId textureId ); /** - * Get the visualUrl associated with the texture id + * @brief Get the visualUrl associated with the texture id. + * @param[in] textureId The texture Id to get + * @return The visual Url associated with the texture id. */ - const VisualUrl& GetVisualUrl( TextureId textureId ); + VisualUrl GetVisualUrl( TextureId textureId ); /** * @brief Get the current state of a texture @@ -353,6 +359,12 @@ public: */ void RemoveObserver( TextureManager::LifecycleObserver& observer ); + /** + * @brief Set an image to be used when a visual has failed to correctly render + * @param[in] brokenImageUrl The broken image url. + */ + void SetBrokenImageUrl(const std::string& brokenImageUrl); + private: /** @@ -470,12 +482,12 @@ 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:3; ///< The load state showing the load progress of the Texture + LoadState loadState:4; ///< The load state showing the load progress of the Texture FittingMode::Type fittingMode:2; ///< The requested FittingMode Dali::SamplingMode::Type samplingMode:3; ///< The requested SamplingMode - StorageType storageType:1; ///< CPU storage / GPU upload; + StorageType storageType:2; ///< CPU storage / GPU upload; bool loadSynchronously:1; ///< True if synchronous loading was requested - UseAtlas useAtlas:1; ///< USE_ATLAS if an atlas was requested. + UseAtlas useAtlas:2; ///< USE_ATLAS if an atlas was requested. ///< This is updated to false if atlas is not used bool cropToMask:1; ///< true if the image should be cropped to the mask size. bool orientationCorrection:1; ///< true if the image should be rotated to match exif orientation data @@ -735,6 +747,7 @@ private: // Member Variables: RoundRobinContainerView< AsyncLoadingHelper > mAsyncRemoteLoaders; ///< The Asynchronous image loaders used to provide all remote async loads std::vector< ExternalTextureInfo > mExternalTextures; ///< Externally provided textures Dali::Vector mLifecycleObservers; ///< Lifecycle observers of texture manager + std::string mBrokenImageUrl; ///< Broken image url TextureId mCurrentTextureId; ///< The current value used for the unique Texture Id generation };