1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef API_RENDER_IRENDER_BACKEND_NODE_H
17 #define API_RENDER_IRENDER_BACKEND_NODE_H
18 
19 #include <render/namespace.h>
20 #include <render/nodecontext/intf_render_node.h>
21 
22 RENDER_BEGIN_NAMESPACE()
23 class ILowLevelDevice;
24 struct RenderBackendRecordingState;
25 
26 /** @ingroup group_render_irenderbackendnode */
27 /** Base class for render backend nodes
28  *
29  * Inherit to create new render backend node that can be used in render node graph.
30  *
31  * Render backend node methods are never called by the API user.
32  * Renderer backend calls the methods in correct pipeline positions automatically.
33  */
34 class IRenderBackendNode : public IRenderNode {
35 public:
36     IRenderBackendNode(const IRenderBackendNode&) = delete;
37     IRenderBackendNode& operator=(const IRenderBackendNode&) = delete;
38 
39     virtual void ExecuteBackendFrame(
40         const ILowLevelDevice& device, const RenderBackendRecordingState& recordingState) = 0;
41 
42 protected:
43     IRenderBackendNode() = default;
44     virtual ~IRenderBackendNode() = default;
45 };
46 RENDER_END_NAMESPACE()
47 
48 #endif // API_RENDER_IRENDER_BACKEND_NODE_H
49