1 #ifndef DALI_TOOLKIT_INTERNAL_EMBOSS_FILTER_H
2 #define DALI_TOOLKIT_INTERNAL_EMBOSS_FILTER_H
5 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
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>
27 #include "image-filter.h"
36 * An embossing image filter, implements Dali::Toolkit::Internal::ImageFilter
38 class EmbossFilter : public ImageFilter
42 * Construct an empty filter
49 virtual ~EmbossFilter();
51 public: // From ImageFilter
52 /// @copydoc Dali::Toolkit::Internal::ImageFilter::Enable
53 void Enable() override;
55 /// @copydoc Dali::Toolkit::Internal::ImageFilter::Disable
56 void Disable() override;
58 /// @copydoc Dali::Toolkit::Internal::ImageFilter::Refresh
59 void Refresh() override;
61 /// @copydoc Dali::Toolkit::Internal::ImageFilter::SetSize
62 void SetSize(const Vector2& size) override;
66 * Setup render tasks for blur
68 void CreateRenderTasks();
71 EmbossFilter(const EmbossFilter&);
72 EmbossFilter& operator=(const EmbossFilter&);
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
87 } // namespace Internal
89 } // namespace Toolkit
93 #endif // DALI_TOOLKIT_INTERNAL_EMBOSS_FILTER_H