DirectRendering:
[platform/core/uifw/dali-core.git] / dali / internal / event / actors / drawable-actor-impl.h
1 #ifndef DALI_INTERNAL_DRAWABLE_ACTOR_H
2 #define DALI_INTERNAL_DRAWABLE_ACTOR_H
3
4 /*
5  * Copyright (c) 2022 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 #include <dali/internal/event/actors/actor-impl.h>
22 #include <dali/public-api/rendering/renderer.h>
23
24 namespace Dali::Internal
25 {
26 namespace SceneGraph
27 {
28 class Node;
29 }
30
31 class DrawableActor;
32 using DrawableActorPtr = IntrusivePtr<DrawableActor>;
33
34 class DrawableActor : public Actor
35 {
36 public:
37   /**
38    * @brief Constructor of DrawableActor
39    *
40    * @param[in] node the scenegraph Node object
41    * @param[in] renderCallback the pointer to the CallbackBase object
42    */
43   explicit DrawableActor(const Internal::SceneGraph::Node& node, RenderCallback* renderCallback);
44
45   /**
46    * @brief Creates new instance of the DrawableActor implementation
47    *
48    * @param[in] renderCallback Pointer to a valid CallbackBase object
49    * @return managed pointer to the DrawableActor implementation
50    */
51   static DrawableActorPtr New(RenderCallback* renderCallback);
52
53 private:
54   Dali::Renderer mRenderer; //< Drawable renderer with callback attached
55 };
56
57 } // namespace Dali::Internal
58
59 #endif // DALI_INTERNAL_DRAWABLE_ACTOR_H