1 /* 2 * Copyright (c) 2022 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_POST_PROCESS_RENDER_POST_PROCESS_BLUR_H 17 #define RENDER_RENDER_POST_PROCESS_RENDER_POST_PROCESS_BLUR_H 18 19 #include <base/math/vector.h> 20 #include <base/util/uid.h> 21 #include <core/plugin/intf_interface.h> 22 #include <core/plugin/intf_interface_helper.h> 23 #include <core/property/intf_property_handle.h> 24 #include <render/namespace.h> 25 #include <render/nodecontext/intf_render_node.h> 26 #include <render/nodecontext/intf_render_post_process.h> 27 #include <render/nodecontext/intf_render_post_process_node.h> 28 29 #include "render_post_process_blur_node.h" 30 RENDER_BEGIN_NAMESPACE()31RENDER_BEGIN_NAMESPACE() 32 class RenderPostProcessBlur final : public CORE_NS::IInterfaceHelper<RENDER_NS::IRenderPostProcess> { 33 public: 34 static constexpr auto UID = BASE_NS::Uid("2132e104-df50-4bc5-9035-224719c13736"); 35 36 RenderPostProcessBlur(); 37 ~RenderPostProcessBlur() override = default; 38 39 CORE_NS::IPropertyHandle* GetProperties() override; 40 41 BASE_NS::Uid GetRenderPostProcessNodeUid() override 42 { 43 return RenderPostProcessBlurNode::UID; 44 } 45 46 void SetData(BASE_NS::array_view<const uint8_t> data) override; 47 BASE_NS::array_view<const uint8_t> GetData() const override; 48 49 // direct access in render nodes 50 RenderPostProcessBlurNode::EffectProperties propertiesData; 51 52 private: 53 CORE_NS::PropertyApiImpl<RenderPostProcessBlurNode::EffectProperties> properties_; 54 }; 55 RENDER_END_NAMESPACE() 56 57 #endif // RENDER_RENDER_POST_PROCESS_RENDER_POST_PROCESS_BLUR_H 58