#define DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
bool GetPixels(std::vector<unsigned char> &pixbuf, uint32_t &width, uint32_t &height, Pixel::Format& pixelFormat ) const override;
/**
- * @copydoc Dali::NativeImageSource::EncodeToFile(const std::string& )
- */
- bool EncodeToFile(const std::string& filename) const override;
-
- /**
* @copydoc Dali::NativeImageSource::SetSource( Any source )
*/
void SetSource( Any source ) override;
~NativeImageSourceAndroid() override;
/**
- * @copydoc Dali::NativeImageSource::GlExtensionCreate()
+ * @copydoc Dali::NativeImageSource::CreateResource()
*/
- bool GlExtensionCreate() override;
+ bool CreateResource() override;
/**
- * @copydoc Dali::NativeImageSource::GlExtensionDestroy()
+ * @copydoc Dali::NativeImageSource::DestroyResource()
*/
- void GlExtensionDestroy() override;
+ void DestroyResource() override;
/**
* @copydoc Dali::NativeImageSource::TargetTexture()
}
/**
+ * @copydoc Dali::NativeImageSource::GetTargetTexture()
+ */
+ int GetTextureTarget() const override;
+
+ /**
+ * @copydoc Dali::NativeImageSource::GetCustomFragmentPrefix()
+ */
+ const char* GetCustomFragmentPrefix() const override;
+
+ /**
+ * @copydoc Dali::NativeImageSource::GetCustomSamplerTypename()
+ */
+ const char* GetCustomSamplerTypename() const override;
+
+ /**
+ * @copydoc Dali::NativeImageSource::GetNativeImageHandle()
+ */
+ Any GetNativeImageHandle() const override
+ {
+ return GetNativeImageSource();
+ }
+
+ /**
+ * @copydoc Dali::NativeImageSource::SourceChanged()
+ */
+ bool SourceChanged() const override
+ {
+ return false;
+ }
+
+ /**
* @copydoc Dali::NativeImageInterface::GetExtension()
*/
NativeImageInterface::Extension* GetNativeImageInterfaceExtension() override
return nullptr;
}
+ /**
+ * @copydoc Dali::Internal::Adaptor::NativeImageSource::AcquireBuffer()
+ */
+ uint8_t* AcquireBuffer( uint16_t& width, uint16_t& height, uint16_t& stride ) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::NativeImageSource::ReleaseBuffer()
+ */
+ bool ReleaseBuffer() override;
+
+ /**
+ * @copydoc Dali::NativeImageSource::SetResourceDestructionCallback()
+ */
+ void SetResourceDestructionCallback(EventThreadCallback* callback) override;
+
private:
/**
Dali::NativeImageSource::ColorDepth mColorDepth; ///< color depth of image
void* mEglImageKHR; ///< From EGL extension
EglImageExtensions* mEglImageExtensions; ///< The EGL Image Extensions
+ std::unique_ptr<EventThreadCallback> mResourceDestructionCallback;
};
} // namespace Adaptor