Add post processor
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / filters / emboss-filter.h
1 #ifndef DALI_TOOLKIT_INTERNAL_EMBOSS_FILTER_H
2 #define DALI_TOOLKIT_INTERNAL_EMBOSS_FILTER_H
3
4 /*
5  * Copyright (c) 2021 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/render-tasks/render-task.h>
23 #include <dali/public-api/rendering/frame-buffer.h>
24 #include <dali/public-api/rendering/renderer.h>
25
26 // INTERNAL INCLUDES
27 #include "image-filter.h"
28
29 namespace Dali
30 {
31 namespace Toolkit
32 {
33 namespace Internal
34 {
35 /**
36  * An embossing image filter, implements Dali::Toolkit::Internal::ImageFilter
37  */
38 class EmbossFilter : public ImageFilter
39 {
40 public:
41   /**
42    * Construct an empty filter
43    */
44   EmbossFilter();
45
46   /**
47    * Destructor
48    */
49   virtual ~EmbossFilter();
50
51 public: // From ImageFilter
52   /// @copydoc Dali::Toolkit::Internal::ImageFilter::Enable
53   void Enable() override;
54
55   /// @copydoc Dali::Toolkit::Internal::ImageFilter::Disable
56   void Disable() override;
57
58   /// @copydoc Dali::Toolkit::Internal::ImageFilter::Refresh
59   void Refresh() override;
60
61   /// @copydoc Dali::Toolkit::Internal::ImageFilter::SetSize
62   void SetSize(const Vector2& size) override;
63
64 private:
65   /**
66    * Setup render tasks for blur
67    */
68   void CreateRenderTasks();
69
70 private:
71   EmbossFilter(const EmbossFilter&);
72   EmbossFilter& operator=(const EmbossFilter&);
73
74 private: // Attributes
75   RenderTask  mRenderTaskForEmboss1;
76   RenderTask  mRenderTaskForEmboss2;
77   RenderTask  mRenderTaskForOutput;
78   FrameBuffer mFrameBufferForEmboss1;
79   FrameBuffer mFrameBufferForEmboss2;
80   Actor       mActorForInput1;
81   Actor       mActorForInput2;
82   Renderer    mRendererForEmboss1;
83   Renderer    mRendererForEmboss2;
84   Actor       mActorForComposite;
85 }; // class EmbossFilter
86
87 } // namespace Internal
88
89 } // namespace Toolkit
90
91 } // namespace Dali
92
93 #endif // DALI_TOOLKIT_INTERNAL_EMBOSS_FILTER_H