1 /* 2 * Copyright (C) 2023 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 RENDER_RENDER__NODE__RENDER_NODE_BACK_BUFFER_GPU_BUFFER_H 17 #define RENDER_RENDER__NODE__RENDER_NODE_BACK_BUFFER_GPU_BUFFER_H 18 19 #include <base/util/uid.h> 20 #include <render/namespace.h> 21 #include <render/nodecontext/intf_render_node.h> 22 #include <render/resource_handle.h> 23 24 RENDER_BEGIN_NAMESPACE() 25 class IGpuResourceManager; 26 class IRenderCommandList; 27 class IRenderNodeContextManager; 28 class IRenderNodeRenderDataStoreManager; 29 struct RenderNodeGraphInputs; 30 31 class RenderNodeBackBufferGpuBuffer final : public IRenderNode { 32 public: 33 RenderNodeBackBufferGpuBuffer() = default; 34 ~RenderNodeBackBufferGpuBuffer() override = default; 35 36 void InitNode(IRenderNodeContextManager& renderNodeContextMgr) override; PreExecuteFrame()37 void PreExecuteFrame() override {}; 38 void ExecuteFrame(IRenderCommandList& cmdList) override; 39 40 // for plugin / factory interface 41 static constexpr BASE_NS::Uid UID { "ee4ae160-8b7f-4043-8c86-2510f48b4e3b" }; 42 static constexpr char const* TYPE_NAME = "CORE_RN_BACKBUFFER_GPUBUFFER"; 43 static constexpr IRenderNode::BackendFlags BACKEND_FLAGS = IRenderNode::BackendFlagBits::BACKEND_FLAG_BITS_DEFAULT; 44 static constexpr IRenderNode::ClassType CLASS_TYPE = IRenderNode::ClassType::CLASS_TYPE_NODE; 45 static IRenderNode* Create(); 46 static void Destroy(IRenderNode* instance); 47 48 private: 49 IRenderNodeContextManager* renderNodeContextMgr_ { nullptr }; 50 }; 51 RENDER_END_NAMESPACE() 52 53 #endif // CORE__RENDER__NODE__RENDER_NODE_BACK_BUFFER_GPU_BUFFER_H 54