Deprecated Layer::TREE_DEPTH_MULTIPLIER and fixed mis-usage.
[platform/core/uifw/dali-core.git] / dali / internal / event / images / image-impl.h
index d0ec736..e6b3af1 100644 (file)
@@ -24,6 +24,7 @@
 // INTERNAL INCLUDES
 #include <dali/public-api/images/image.h>
 #include <dali/public-api/object/base-object.h>
+#include <dali/internal/event/rendering/texture-impl.h>
 #include <dali/internal/event/resources/resource-client.h>
 #include <dali/internal/event/resources/resource-ticket-observer.h>
 
@@ -33,14 +34,10 @@ namespace Dali
 namespace Internal
 {
 
-typedef Dali::Image::ReleasePolicy ReleasePolicy;
-
 class Image;
 class ImageFactory;
 typedef IntrusivePtr<Image> ImagePtr;
 
-const ReleasePolicy IMAGE_RELEASE_POLICY_DEFAULT = Dali::Image::NEVER;
-
 /**
  * Image represents an image resource that can be added to actors etc.
  * When the Image object is created, resource loading will be attempted.
@@ -51,11 +48,6 @@ class Image : public BaseObject, public ResourceTicketObserver
 public:
 
   /**
-   * @copydoc Dali::Image::GetReleasePolicy()
-   */
-  ReleasePolicy GetReleasePolicy () const { return mReleasePolicy; }
-
-  /**
    * @copydoc Dali::Image::UploadedSignal()
    */
   Dali::Image::ImageSignalType& UploadedSignal() { return mUploaded; }
@@ -102,6 +94,14 @@ public:
    */
   virtual Vector2 GetNaturalSize() const;
 
+  /**
+   * Returns a pointer to the internal texture used by the image
+   */
+  NewTexture* GetTexture() const
+  {
+    return mTexture.Get();
+  }
+
 public: // From ResourceTicketObserver
 
   /**
@@ -119,16 +119,6 @@ public: // From ResourceTicketObserver
    */
   virtual void ResourceUploaded(const ResourceTicket& ticket);
 
-  /**
-   * @copydoc Dali::Internal::ResourceTicketObserver::ResourceSavingSucceeded()
-   */
-  virtual void ResourceSavingSucceeded( const ResourceTicket& ticket );
-
-  /**
-   * @copydoc Dali::Internal::ResourceTicketObserver::ResourceSavingFailed()
-   */
-  virtual void ResourceSavingFailed( const ResourceTicket& ticket );
-
 public:
 
   /**
@@ -151,7 +141,7 @@ protected:
   /**
    * Constructor, with default parameters
    */
-  Image( ReleasePolicy releasePol = IMAGE_RELEASE_POLICY_DEFAULT );
+  Image();
 
   /**
    * Second stage initialization
@@ -161,14 +151,13 @@ protected:
 protected:
 
   ResourceTicketPtr mTicket;              ///< smart pointer to the ticket object that gets completed when load finishes
+  NewTexturePtr mTexture;                 ///< smart pointer to the texture used by the image
 
-  mutable unsigned int mWidth;     ///< natural width of the image, needs to be mutable for lazy resolving and as the API for GetWidth is const
-  mutable unsigned int mHeight;    ///< natural height of the image, needs to be mutable for lazy resolving and as the API for GetHeight is const
+  unsigned int mWidth;     ///< natural width of the image
+  unsigned int mHeight;    ///< natural height of the image
 
   unsigned int mConnectionCount; ///< number of on-stage objects using this image
 
-  ReleasePolicy  mReleasePolicy : 2; ///< 2 bits is enough space
-
 private:
 
   Dali::Image::ImageSignalType mUploaded;