• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "render_node_combined_post_process.h"
17 
18 #include <render/namespace.h>
19 #include <render/nodecontext/intf_node_context_descriptor_set_manager.h>
20 #include <render/nodecontext/intf_render_command_list.h>
21 #include <render/nodecontext/intf_render_node_context_manager.h>
22 #include <render/resource_handle.h>
23 
RENDER_BEGIN_NAMESPACE()24 RENDER_BEGIN_NAMESPACE()
25 void RenderNodeCombinedPostProcess::InitNode(IRenderNodeContextManager& renderNodeContextMgr)
26 {
27     renderNodeContextMgr_ = &renderNodeContextMgr;
28     rnPostProcessUtil_.Init(*renderNodeContextMgr_, { true, {} });
29 }
30 
PreExecuteFrame()31 void RenderNodeCombinedPostProcess::PreExecuteFrame()
32 {
33     rnPostProcessUtil_.PreExecute({ true, {} });
34 }
35 
ExecuteFrame(IRenderCommandList & cmdList)36 void RenderNodeCombinedPostProcess::ExecuteFrame(IRenderCommandList& cmdList)
37 {
38     rnPostProcessUtil_.Execute(cmdList);
39 }
40 
41 // for plugin / factory interface
Create()42 IRenderNode* RenderNodeCombinedPostProcess::Create()
43 {
44     return new RenderNodeCombinedPostProcess();
45 }
46 
Destroy(IRenderNode * instance)47 void RenderNodeCombinedPostProcess::Destroy(IRenderNode* instance)
48 {
49     delete static_cast<RenderNodeCombinedPostProcess*>(instance);
50 }
51 RENDER_END_NAMESPACE()
52