Merge branch 'blender2.7'
[blender.git] / intern / cycles / render / image.h
index 5d4e99401b23f03ebd5b7460f2371f47c09f34ba..1403b9050fdeef911adc60f3f2fc28638040318e 100644 (file)
@@ -23,6 +23,7 @@
 #include "util/util_image.h"
 #include "util/util_string.h"
 #include "util/util_thread.h"
 #include "util/util_image.h"
 #include "util/util_string.h"
 #include "util/util_thread.h"
+#include "util/util_unique_ptr.h"
 #include "util/util_vector.h"
 
 CCL_NAMESPACE_BEGIN
 #include "util/util_vector.h"
 
 CCL_NAMESPACE_BEGIN
@@ -43,6 +44,18 @@ public:
        /* Automatically set. */
        ImageDataType type;
        bool is_linear;
        /* Automatically set. */
        ImageDataType type;
        bool is_linear;
+
+       bool operator==(const ImageMetaData& other) const
+       {
+               return is_float == other.is_float &&
+                      is_half == other.is_half &&
+                      channels == other.channels &&
+                      width == other.width &&
+                      height == other.height &&
+                      depth == other.depth &&
+                      type == other.type &&
+                      is_linear == other.is_linear;
+       }
 };
 
 class ImageManager {
 };
 
 class ImageManager {
@@ -145,8 +158,7 @@ private:
        vector<Image*> images[IMAGE_DATA_NUM_TYPES];
        void *osl_texture_system;
 
        vector<Image*> images[IMAGE_DATA_NUM_TYPES];
        void *osl_texture_system;
 
-       bool file_load_image_generic(Image *img,
-                                    ImageInput **in);
+       bool file_load_image_generic(Image *img, unique_ptr<ImageInput> *in);
 
        template<TypeDesc::BASETYPE FileFormat,
                 typename StorageType,
 
        template<TypeDesc::BASETYPE FileFormat,
                 typename StorageType,