X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ffilters%2Fimage-filter.h;h=fcdaf01b0162578e8d07d96b557aeabcae0e9c5d;hb=5764add32178084fbb97df64a7fd81bd624e56d4;hp=bc4b16458439c10b308f95f7dc75352890617477;hpb=c3f7ea6cb0c0b75c2276193aff88b5c7a679a2d5;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/filters/image-filter.h b/dali-toolkit/internal/filters/image-filter.h index bc4b164..fcdaf01 100644 --- a/dali-toolkit/internal/filters/image-filter.h +++ b/dali-toolkit/internal/filters/image-filter.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_INTERNAL_IMAGE_FILTER_H__ -#define __DALI_TOOLKIT_INTERNAL_IMAGE_FILTER_H__ +#ifndef DALI_TOOLKIT_INTERNAL_IMAGE_FILTER_H +#define DALI_TOOLKIT_INTERNAL_IMAGE_FILTER_H /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 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. @@ -19,31 +19,30 @@ */ // EXTERNAL INCLUDES +#include +#include +#include // INTERNAL INCLUDES -#include #include +#include namespace Dali { - namespace Toolkit { - namespace Internal { - /** * An interface class that provides a interface for image filters that perform - * a simple shader effect on an input image, rendering the output to a FrameBufferImage. + * a simple shader effect on an input texture, rendering the output to a FrameBuffer. */ class ImageFilter { public: - typedef std::vector< Vector3 > FilterKernel; + typedef std::vector FilterKernel; public: - /** * Default constructor */ @@ -72,37 +71,37 @@ public: /** * @copydoc Dali::Toolkit::EffectsView::SetRefreshOnDemand */ - void SetRefreshOnDemand( bool onDemand ); + void SetRefreshOnDemand(bool onDemand); /** - * Set the input image - * @param[in] The input/original image. + * Set the input texture + * @param[in] The input/original texture. */ - void SetInputImage( Image image ); + void SetInputTexture(Texture texture); /** - * Set the output image - * @return The output image. + * Set the output frame buffer + * @return The output frame buffer. */ - void SetOutputImage( FrameBufferImage image ); + void SetOutputFrameBuffer(FrameBuffer frameBuffer); /** * Set size of ImageFilter. Used to create internal offscreen buffers * @param[in] size THe size. */ - virtual void SetSize( const Vector2& size ); + virtual void SetSize(const Vector2& size); /** * Set the pixel format for internal offscreen buffers * @param[in] pixelFormat The pixel format. */ - void SetPixelFormat( Pixel::Format pixelFormat ); + void SetPixelFormat(Pixel::Format pixelFormat); /** * Set the filter kernel * @param[in] The filter kernel */ - void SetKernel( const FilterKernel& kernel ); + void SetKernel(const FilterKernel& kernel); /** * Get a const reference to the internal filter kernel @@ -121,37 +120,38 @@ public: * @param[in] weights * @param[in] count */ - void CreateKernel( const float* weights, size_t count); + void CreateKernel(const float* weights, size_t count); /** * Set the actor which acts as the root actor for all internal actors for connection to stage * @param[in] rootActor An actor which acts as the root actor for any internal actors that need * to be created */ - void SetRootActor( Actor rootActor ); + void SetRootActor(Actor rootActor); /** * Set the background / clear color * @param[in] color The background / clear color */ - void SetBackgroundColor( const Vector4& color ); + void SetBackgroundColor(const Vector4& color); +protected: /** - * Enable optional debug output in the shader - * @param[in] flag Set true to enable, dalse to disable. + * Setup position and parameters for camera */ - void RenderDebug( bool flag ); + void SetupCamera(); protected: - Image mInputImage; - FrameBufferImage mOutputImage; - FilterKernel mKernel; - Actor mRootActor; - Vector4 mBackgroundColor; - Vector2 mTargetSize; - Pixel::Format mPixelFormat; - bool mRefreshOnDemand; - bool mDebugRender; + Texture mInputTexture; + FrameBuffer mOutputFrameBuffer; + FilterKernel mKernel; + Actor mRootActor; + CameraActor mCameraActor; + Vector4 mBackgroundColor; + Vector2 mTargetSize; + Pixel::Format mPixelFormat; + bool mRefreshOnDemand; + }; // class Imagefilter } // namespace Internal @@ -160,5 +160,4 @@ protected: } // namespace Dali -#endif // __DALI_TOOLKIT_INTERNAL_IMAGE_FILTER_H__ - +#endif // DALI_TOOLKIT_INTERNAL_IMAGE_FILTER_H