diff --git a/build/gn/BUILD.gn b/build/gn/BUILD.gn index 0da0214d1a7ed70d347870bf15790a12d35652fb..22e2e282670132c79b062b9b36363f10586a1fd7 100644 --- a/build/gn/BUILD.gn +++ b/build/gn/BUILD.gn @@ -22,6 +22,7 @@ group("ft_display_server") { group("ft_window_manager") { deps = [ "//window_manager/wmserver/ft_build:libwms", + "//window_manager/ft_pointer_draw:libpointerdraw", ] } diff --git a/etc/icon/Default.png b/etc/icon/Default.png new file mode 100644 index 0000000000000000000000000000000000000000..6308171fe9d612050376f6a5dfdc870e51bc92db Binary files /dev/null and b/etc/icon/Default.png differ diff --git a/window_manager/ft_pointer_draw/BUILD.gn b/window_manager/ft_pointer_draw/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..7f3aa555cf4ccad5b48f2da59c30078ade2ee53f --- /dev/null +++ b/window_manager/ft_pointer_draw/BUILD.gn @@ -0,0 +1,50 @@ +# Copyright (c) 2023 Huawei Technologies Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/gn/fangtian.gni") +import("//config.gni") + +config("pointer_draw_config") { + visibility = [ ":*" ] + + cflags = [ + "-Wno-c++11-narrowing", + "-DUSE_IMITATE_POINTER", + ] + + include_dirs = [ + "$window_manager_path/interfaces/innerkits/dm", + "/usr/local/include/mmi", + ] +} + +ft_shared_library("libpointerdraw") { + sources = [ + "pointer_draw_manager.cpp", + "ft_pointer_draw_manager_adapter.cpp", + ] + + configs = [ + ":pointer_draw_config", + ] + + deps = [ + "$display_server_root/rosen/modules/render_service_base/ft_build:librender_service_base", + "$display_server_root/rosen/modules/render_service_client/ft_build:librender_service_client", + "$window_manager_path/dmserver/ft_build:libdms", + "//build/gn/configs/system_libs:eventhandler", + "//build/gn/configs/system_libs:image", + "//build/gn/configs/system_libs:safwk", + "//build/gn/configs/system_libs:skia", + ] +} diff --git a/window_manager/ft_pointer_draw/ft_pointer_draw_manager_adapter.cpp b/window_manager/ft_pointer_draw/ft_pointer_draw_manager_adapter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9962963069beec1c7ce8a7edfb24f41750ead654 --- /dev/null +++ b/window_manager/ft_pointer_draw/ft_pointer_draw_manager_adapter.cpp @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2023 Huawei Technologies Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include "i_pointer_drawing_manager.h" +#include "display_info.h" + +namespace OHOS { +namespace MMI { + +#if defined(__cplusplus) +extern "C" { +#endif // __cplusplus + +using PointerDrawPtr = std::shared_ptr; +std::map g_pointerDrawMap; +constexpr uint32_t MAX_PTRDRAW_NUMS = 64; + +static PointerDrawPtr FindPointerDraw(const uintptr_t instanceHdl) +{ + auto it = g_pointerDrawMap.find(instanceHdl); + if (it == g_pointerDrawMap.end()) { + return nullptr; + } + return it->second; +} + +uintptr_t FTPtrDrawMgrGetInstance() +{ + if (g_pointerDrawMap.size() > MAX_PTRDRAW_NUMS) { + return 0; + } + + PointerDrawPtr instance = IPointerDrawingManager::GetInstance(); + if (instance == nullptr) { + return 0; + } + + uintptr_t instanceHdl = reinterpret_cast(instance.get()); + g_pointerDrawMap[instanceHdl] = instance; + return instanceHdl; +} + +void FTPtrDrawMgrFreeInstance(const uintptr_t instanceHdl) +{ + if (g_pointerDrawMap.size() == 0) { + return; + } + g_pointerDrawMap.erase(instanceHdl); +} + +bool FTPtrDrawMgrInit(const uintptr_t instanceHdl) +{ + PointerDrawPtr instance = FindPointerDraw(instanceHdl); + if (instance == nullptr) { + return false; + } + + instance->Init(); + return true; +} + +bool FTPtrDrawMgrUpdataDispInfo(const uintptr_t instanceHdl, const DisplayInfo& displayInfo) +{ + PointerDrawPtr instance = FindPointerDraw(instanceHdl); + if (instance == nullptr) { + return false; + } + + instance->UpdateDisplayInfo(displayInfo); + return true; +} + +bool FTPtrDrawMgrDrawPointer(const uintptr_t instanceHdl, int32_t displayId, int32_t physicalX, int32_t physicalY) +{ + PointerDrawPtr instance = FindPointerDraw(instanceHdl); + if (instance == nullptr) { + return false; + } + + instance->DrawPointer(displayId, physicalX, physicalY); + return true; +} + +#if defined(__cplusplus) +} +#endif // __cplusplus + +} // MMI +} // OHOS \ No newline at end of file diff --git a/window_manager/ft_pointer_draw/i_pointer_drawing_manager.h b/window_manager/ft_pointer_draw/i_pointer_drawing_manager.h new file mode 100644 index 0000000000000000000000000000000000000000..385d00325ae3bd2c1f8552709586ecce7c428e30 --- /dev/null +++ b/window_manager/ft_pointer_draw/i_pointer_drawing_manager.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef I_POINTER_DRAWING_MANAGER_H +#define I_POINTER_DRAWING_MANAGER_H + +#include + +#include "display_info.h" +#include "struct_multimodal.h" + +namespace OHOS { +namespace MMI { +class IPointerDrawingManager { +public: + IPointerDrawingManager() = default; + virtual ~IPointerDrawingManager() = default; + + static std::shared_ptr GetInstance(); + virtual void DrawPointer(int32_t displayId, int32_t physicalX, int32_t physicalY, + const MOUSE_ICON mouseStyle = MOUSE_ICON::DEFAULT) {} + virtual void UpdateDisplayInfo(const DisplayInfo& displayInfo) {} + virtual void OnDisplayInfo(const DisplayGroupInfo& displayGroupInfo) {} + virtual void OnWindowInfo(const WinInfo &info) {} + virtual bool Init() + { + return true; + } + virtual void DeletePointerVisible(int32_t pid) {} + virtual int32_t SetPointerVisible(int32_t pid, bool visible) + { + return 0; + } + virtual int32_t SetPointerStyle(int32_t pid, int32_t windowId, int32_t pointerStyle) + { + return 0; + } + virtual int32_t GetPointerStyle(int32_t pid, int32_t windowId, int32_t &pointerStyle) + { + return 0; + } + virtual void DrawPointerStyle() {} + virtual bool IsPointerVisible() + { + return false; + } + virtual void SetMouseDisplayState(bool state) {} + virtual bool GetMouseDisplayState() const + { + return true; + } + virtual void SetPointerLocation(int32_t pid, int32_t x, int32_t y) {} +public: + static inline std::shared_ptr iPointDrawMgr_ { nullptr }; +}; +} // namespace MMI +} // namespace OHOS +#endif // I_POINTER_DRAWING_MANAGER_H \ No newline at end of file diff --git a/window_manager/ft_pointer_draw/pointer_draw_manager.cpp b/window_manager/ft_pointer_draw/pointer_draw_manager.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a3ac259771e623c850b6cca08b230e6e8df80ed1 --- /dev/null +++ b/window_manager/ft_pointer_draw/pointer_draw_manager.cpp @@ -0,0 +1,317 @@ +/* + * Copyright (c) 2023 Huawei Technologies Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "pointer_draw_manager.h" + +#include "unistd.h" +#include + +#include "ui/rs_surface_extractor.h" +#include "transaction/rs_transaction.h" +#include "image_source.h" + +namespace OHOS { +namespace MMI { +namespace { + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "PointerDrawingManager"}; + constexpr int32_t PATH_MAX = 200; + const std::string POINTER_PIXEL_PATH = "/usr/local/share/ft/icon/"; + constexpr int32_t FILE_SIZE_MAX = 0X5000; + constexpr int32_t ICON_WIDTH = 40; + constexpr int32_t ICON_HEIGHT = 40; +} + +std::shared_ptr IPointerDrawingManager::GetInstance() +{ + if (iPointDrawMgr_ == nullptr) { + iPointDrawMgr_ = std::make_shared(); + } + return iPointDrawMgr_; +} + +bool PointerDrawingManager::Init() +{ +#ifndef USE_IMITATE_POINTER + if (InitIconPixel() != WMError::WM_OK) { + WLOGFE("InitIconPixel fail"); + return false; + } +#endif + + runner_ = AppExecFwk::EventRunner::Create("PointerDrawingManager"); + handler_ = std::make_shared(runner_); + + return true; +} + +void PointerDrawingManager::DrawPointer(int32_t displayId, int32_t physicalX, int32_t physicalY, + const MOUSE_ICON mouseStyle) +{ + if (!isDrawing_) { + if (InitLayerNode(physicalX, physicalY) != WMError::WM_OK) { + WLOGFE("InitLayerNode fail"); + return; + } + + if (InitDisplayNode() != WMError::WM_OK) { + WLOGFE("InitDisplayNode fail"); + return; + } + isDrawing_ = true; + return; + } + + if (handler_ == nullptr) { + WLOGFE("EventHandler is nullptr"); + return; + } + + std::function task = [this, physicalX, physicalY]() -> void { + MoveTo(physicalX, physicalY); + }; + + bool ret = handler_->PostTask(task); + if (ret == false) { + WLOGFE("EventHandler PostTask Failed"); + } +} + +void PointerDrawingManager::SetPointerLocation(int32_t pid, int32_t x, int32_t y) +{ + if (!isDrawing_) { + WLOGFE("need to invoke DrawPointer before SetPointerLocation"); + return; + } + + if (handler_ == nullptr) { + WLOGFE("EventHandler is nullptr"); + return; + } + + std::function task = [this, x, y]() -> void { + MoveTo(x, y); + }; + + bool ret = handler_->PostTask(task); + if (ret == false) { + WLOGFE("EventHandler PostTask Failed"); + } +} + +void PointerDrawingManager::UpdateDisplayInfo(const DisplayInfo& displayInfo) +{ + displayWidth_ = displayInfo.width; + displayHeight_ = displayInfo.height; + displayId_ = displayInfo.id; + + if (displayWidth_ <= 0 || displayHeight_ <= 0) { + WLOGFE("Invalid DisplayInfo"); + } +} + +WMError PointerDrawingManager::MoveTo(int32_t x, int32_t y) +{ + if (surfaceNode_ == nullptr) { + WLOGFE("surfaceNode_ is nullptr"); + return WMError::WM_ERROR_NULLPTR; + } + + surfaceNode_->SetBounds(x, y, ICON_WIDTH, ICON_HEIGHT); + Rosen::RSTransaction::FlushImplicitTransaction(); + + return WMError::WM_OK; +} + +WMError PointerDrawingManager::InitLayerNode(int32_t x, int32_t y) +{ + Rosen::RSSurfaceNodeConfig config; + surfaceNode_ = Rosen::RSSurfaceNode::Create(config); + if (surfaceNode_ == nullptr) { + WLOGFE("RSSurfaceNode::Create fail"); + return WMError::WM_ERROR_NULLPTR; + } + + surfaceNode_->SetBounds(x, y, ICON_WIDTH, ICON_HEIGHT); + rsSurface_ = Rosen::RSSurfaceExtractor::ExtractRSSurface(surfaceNode_); + if (rsSurface_ == nullptr) { + WLOGFE("ExtractRSSurface fail"); + return WMError::WM_ERROR_NULLPTR; + } + + auto framePtr = rsSurface_->RequestFrame(ICON_WIDTH, ICON_HEIGHT); + if (framePtr == nullptr) { + WLOGFE("RequestFrame fail"); + return WMError::WM_ERROR_NULLPTR; + } + + auto canvas = framePtr->GetCanvas(); + canvas->clear(SK_ColorTRANSPARENT); + +#ifdef USE_IMITATE_POINTER + SkPaint paint; + paint.setAntiAlias(true); + paint.setStyle(SkPaint::kFill_Style); + paint.setStrokeJoin(SkPaint::kRound_Join); + paint.setColor(SK_ColorBLUE); + canvas->drawRect(SkRect::MakeXYWH(0, 0, ICON_WIDTH, ICON_HEIGHT), paint); +#else + if (mouseIcons_.size() == 0) { + WLOGFE("can not find icon pixel file"); + return WMError::WM_ERROR_NULLPTR; + } + auto pixelmap = DecodeImageToPixelMap(mouseIcons_[DEFAULT].iconPath); + if (pixelmap == nullptr) { + WLOGFE("DecodeImageToPixelMap fail"); + return WMError::WM_ERROR_NULLPTR; + } + + SkImageInfo imageInfo = SkImageInfo::Make(pixelmap->GetWidth(), pixelmap->GetHeight(), + PixelFormatConvert(pixelmap->GetPixelFormat()), + static_cast(pixelmap->GetAlphaType())); + SkPixmap srcPixmap(imageInfo, pixelmap->GetPixels(), pixelmap->GetRowBytes()); + SkBitmap srcBitmap; + srcBitmap.installPixels(srcPixmap); + canvas->drawBitmap(srcBitmap, 0, 0); +#endif + framePtr->SetDamageRegion(0, 0, ICON_WIDTH, ICON_HEIGHT); + rsSurface_->FlushFrame(framePtr); + + return WMError::WM_OK; +} + +WMError PointerDrawingManager::InitDisplayNode() +{ + Rosen::RSDisplayNodeConfig config; + displayNode_ = Rosen::RSDisplayNode::Create(config); + if (displayNode_ == nullptr) { + WLOGFE("RSDisplayNode::Create fail"); + return WMError::WM_ERROR_NULLPTR; + } + + displayNode_->SetScreenId(displayId_); + displayNode_->SetBounds(0, 0, displayWidth_, displayHeight_); + displayNode_->AddChild(surfaceNode_, -1); + Rosen::RSTransaction::FlushImplicitTransaction(); + + return WMError::WM_OK; +} + +WMError PointerDrawingManager::InitIconPixel() +{ + mouseIcons_ = { + {DEFAULT, {ANGLE_NW, POINTER_PIXEL_PATH + "Default.png"}}, + }; + for (auto iter = mouseIcons_.begin(); iter != mouseIcons_.end();) { + if (CheckPixelFile(iter->second.iconPath) != WMError::WM_OK) { + iter = mouseIcons_.erase(iter); + continue; + } + ++iter; + } + + if (mouseIcons_.size() == 0) { + WLOGFE("InitStyle fail"); + return WMError::WM_ERROR_NULLPTR; + } + + return WMError::WM_OK; +} + +WMError PointerDrawingManager::CheckPixelFile(const std::string &filePath) +{ + if (filePath.empty()) { + WLOGFE("Empty path"); + return WMError::WM_ERROR_NULLPTR; + } + + if (access(filePath.c_str(), F_OK) != 0) { + WLOGFE("Unreachable path"); + return WMError::WM_ERROR_NULLPTR; + } + + char realPath[PATH_MAX] = {}; + if (realpath(filePath.c_str(), realPath) == nullptr) { + WLOGFE("Invalid path"); + return WMError::WM_ERROR_NULLPTR; + } + + struct stat statbuf = {0}; + if (stat(filePath.c_str(), &statbuf) != 0) { + WLOGFE("Failed to get size"); + return WMError::WM_ERROR_NULLPTR; + } + if (statbuf.st_size <= 0 || statbuf.st_size > FILE_SIZE_MAX) { + WLOGFE("Invalid size"); + return WMError::WM_ERROR_NULLPTR; + } + + return WMError::WM_OK; +} + +std::unique_ptr PointerDrawingManager::DecodeImageToPixelMap(const std::string &imagePath) +{ + OHOS::Media::SourceOptions opts; + opts.formatHint = "image/png"; + uint32_t ret = 0; + auto imageSource = OHOS::Media::ImageSource::CreateImageSource(imagePath, opts, ret); + if (ret != 0) { + WLOGFE("CreateImageSource fail"); + return nullptr; + } + + std::set formats; + ret = imageSource->GetSupportedFormats(formats); + if (ret != 0) { + WLOGFE("GetSupportedFormats fail"); + return nullptr; + } + + OHOS::Media::DecodeOptions decodeOpts; + decodeOpts.desiredSize = { + .width = ICON_WIDTH, + .height = ICON_HEIGHT + }; + std::unique_ptr pixelMap = imageSource->CreatePixelMap(decodeOpts, ret); + if (pixelMap == nullptr) { + WLOGFE("CreatePixelMap fail"); + return nullptr; + } + return pixelMap; +} + +SkColorType PointerDrawingManager::PixelFormatConvert(const Media::PixelFormat& pixelFormat) +{ + SkColorType colorType; + switch (pixelFormat) { + case Media::PixelFormat::BGRA_8888: + colorType = SkColorType::kBGRA_8888_SkColorType; + break; + case Media::PixelFormat::RGBA_8888: + colorType = SkColorType::kRGBA_8888_SkColorType; + break; + case Media::PixelFormat::RGB_565: + colorType = SkColorType::kRGB_565_SkColorType; + break; + case Media::PixelFormat::ALPHA_8: + colorType = SkColorType::kAlpha_8_SkColorType; + break; + default: + colorType = SkColorType::kUnknown_SkColorType; + break; + } + return colorType; +} +} // namespace MMI +} // namespace OHOS diff --git a/window_manager/ft_pointer_draw/pointer_draw_manager.h b/window_manager/ft_pointer_draw/pointer_draw_manager.h new file mode 100644 index 0000000000000000000000000000000000000000..f2a9933bd424b12b2e00be91645e1d7932950c7e --- /dev/null +++ b/window_manager/ft_pointer_draw/pointer_draw_manager.h @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2023 Huawei Technologies Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef POINTER_DRAW_H +#define POINTER_DRAW_H + +#include "i_pointer_drawing_manager.h" +#include "hilog/log.h" +#include "nocopyable.h" +#include "ui/rs_display_node.h" +#include "ui/rs_surface_node.h" +#include "pixel_map.h" +#include "event_handler.h" + +namespace OHOS { +namespace MMI { +static constexpr unsigned int HILOG_DOMAIN_WINDOW = 0xD004200; + +#define _W_DFUNC HiviewDFX::HiLog::Debug +#define _W_IFUNC HiviewDFX::HiLog::Info +#define _W_WFUNC HiviewDFX::HiLog::Warn +#define _W_EFUNC HiviewDFX::HiLog::Error + +#define _W_CPRINTF(func, fmt, ...) func(LABEL, "<%{public}d>" fmt, __LINE__, ##__VA_ARGS__) + +#define WLOGD(fmt, ...) _W_CPRINTF(_W_DFUNC, fmt, ##__VA_ARGS__) +#define WLOGI(fmt, ...) _W_CPRINTF(_W_IFUNC, fmt, ##__VA_ARGS__) +#define WLOGW(fmt, ...) _W_CPRINTF(_W_WFUNC, fmt, ##__VA_ARGS__) +#define WLOGE(fmt, ...) _W_CPRINTF(_W_EFUNC, fmt, ##__VA_ARGS__) + +#define _W_FUNC __func__ + +#define WLOGFD(fmt, ...) WLOGD("%{public}s: " fmt, _W_FUNC, ##__VA_ARGS__) +#define WLOGFI(fmt, ...) WLOGI("%{public}s: " fmt, _W_FUNC, ##__VA_ARGS__) +#define WLOGFW(fmt, ...) WLOGW("%{public}s: " fmt, _W_FUNC, ##__VA_ARGS__) +#define WLOGFE(fmt, ...) WLOGE("%{public}s: " fmt, _W_FUNC, ##__VA_ARGS__) + +class PointerDrawingManager : public IPointerDrawingManager { +public: + DISALLOW_COPY_AND_MOVE(PointerDrawingManager); + PointerDrawingManager() = default; + ~PointerDrawingManager() = default; + + bool Init() override; + void DrawPointer(int32_t displayId, int32_t physicalX, int32_t physicalY, + const MOUSE_ICON mouseStyle = MOUSE_ICON::DEFAULT) override; + void UpdateDisplayInfo(const DisplayInfo& displayInfo) override; + void SetPointerLocation(int32_t pid, int32_t x, int32_t y) override; + void OnDisplayInfo(const DisplayGroupInfo& displayGroupInfo) override {} + void OnWindowInfo(const WinInfo &info) override {} + void DeletePointerVisible(int32_t pid) override {} + void SetMouseDisplayState(bool state) override {} + void DrawPointerStyle() override {} + int32_t SetPointerVisible(int32_t pid, bool visible) override + { + return WMError::WM_OK; + } + int32_t SetPointerStyle(int32_t pid, int32_t windowId, int32_t pointerStyle) override + { + return WMError::WM_OK; + } + int32_t GetPointerStyle(int32_t pid, int32_t windowId, int32_t &pointerStyle) override + { + return WMError::WM_OK; + } + bool IsPointerVisible() override + { + return true; + } + bool GetMouseDisplayState() const override + { + return true; + } + +private: + using Task = std::function; + struct IconStyle { + ICON_TYPE type; + std::string iconPath; + }; + + OHOS::WMError InitLayerNode(int32_t x, int32_t y); + OHOS::WMError InitDisplayNode(); + OHOS::WMError InitIconPixel(); + OHOS::WMError CheckPixelFile(const std::string &filePath); + OHOS::WMError MoveTo(int32_t x, int32_t y); + std::unique_ptr DecodeImageToPixelMap(const std::string &imagePath); + SkColorType PixelFormatConvert(const OHOS::Media::PixelFormat& pixelFormat); + + bool isDrawing_ = false; + int32_t displayWidth_ = 0; + int32_t displayHeight_ = 0; + int32_t displayId_ = 0; + std::map mouseIcons_; + OHOS::Rosen::RSDisplayNode::SharedPtr displayNode_ = nullptr; + OHOS::Rosen::RSSurfaceNode::SharedPtr surfaceNode_ = nullptr; + std::shared_ptr rsSurface_ = nullptr; + std::shared_ptr runner_ = nullptr; + std::shared_ptr handler_ = nullptr; +}; +} // namespace MMI +} // namespace OHOS +#endif // POINTER_DRAW_H