From: luozheng <1732036298@qq.com> Date: Sat, 12 Oct 2024 06:34:18 +0000 (+0800) Subject: 关机动画使用IMG_SRC_FILE_PATH而不用IMG_SRC_IMAGE_INFO ,解决关机动画出现慢问题 X-Git-Tag: release_V1.2.70_20241020_135402~68 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F1169%2Fhead;p=mirrors%2FFD230.git 关机动画使用IMG_SRC_FILE_PATH而不用IMG_SRC_IMAGE_INFO ,解决关机动画出现慢问题 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/include/ShutDownImageAnimatorView.h b/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/include/ShutDownImageAnimatorView.h index 0e23c99d6..c57f5246c 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/include/ShutDownImageAnimatorView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/include/ShutDownImageAnimatorView.h @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-07-20 11:05:46 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-10-11 16:13:29 + * @LastEditTime: 2024-10-12 14:29:17 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/include/ShutDownImageAnimatorView.h */ @@ -41,7 +41,8 @@ namespace OHOS UIViewGroup *group{nullptr}; UIImageAnimatorView *shutDownImageAnimatorView{nullptr}; // 关机动画 ImageAnimatorInfo ShutDownImageInfo[SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES]; // 关机图像的信息 - const ImageInfo **ShutDownPathsArray{nullptr}; // 关机图片路径数组 + const char **ShutDownPathsArray{nullptr}; + // const ImageInfo **ShutDownPathsArray{nullptr}; // 关机图片路径数组 int OperationType; bool isShutDownImageAnimatorStart{false}; }; diff --git a/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/ShutDownImageAnimatorView.cpp b/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/ShutDownImageAnimatorView.cpp index 29d932b1b..8116e9a6d 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/ShutDownImageAnimatorView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/ShutDownImageAnimatorView.cpp @@ -41,8 +41,8 @@ namespace OHOS delete shutDownImageAnimatorView; shutDownImageAnimatorView = nullptr; } - // FreeImageInfoArray(ShutDownPathsArray, SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES); - FreeImageInfoArray(ShutDownPathsArray,ShutDownPaths,SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES); + FreeImagePathsArray(ShutDownPathsArray, SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES); + // FreeImageInfoArray(ShutDownPathsArray,ShutDownPaths,SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES); delete group; group = nullptr; } @@ -98,8 +98,8 @@ namespace OHOS bool ShutDownImageAnimatorView::ShowUpShutDownAnimatorView() { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ShutDownImageAnimatorView::ShowUpShutDownAnimatorView"); - // ShutDownPathsArray = CreateImagePathsArray(ShutDownPaths, SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES); - ShutDownPathsArray = CreateImageInfoArray(ShutDownPaths, SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES); + ShutDownPathsArray = CreateImagePathsArray(ShutDownPaths, SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES); + // ShutDownPathsArray = CreateImageInfoArray(ShutDownPaths, SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES); if (shutDownImageAnimatorView == nullptr) { @@ -111,10 +111,10 @@ namespace OHOS } for (uint8_t i = 0; i < SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES; i++) { - // ShutDownImageInfo[i].imagePath = (ShutDownPathsArray[i]); - // ShutDownImageInfo[i].imageType = IMG_SRC_FILE_PATH; - ShutDownImageInfo[i].imageInfo = (ShutDownPathsArray[i]); - ShutDownImageInfo[i].imageType = IMG_SRC_IMAGE_INFO; + ShutDownImageInfo[i].imagePath = (ShutDownPathsArray[i]); + ShutDownImageInfo[i].imageType = IMG_SRC_FILE_PATH; + // ShutDownImageInfo[i].imageInfo = (ShutDownPathsArray[i]); + // ShutDownImageInfo[i].imageType = IMG_SRC_IMAGE_INFO; ShutDownImageInfo[i].pos.x = SHUTDOWN_IMAGE_ANIMATOR_VIEW_X; ShutDownImageInfo[i].pos.y = SHUTDOWN_IMAGE_ANIMATOR_VIEW_Y; ShutDownImageInfo[i].width = SHUTDOWN_IMAGE_ANIMATOR_VIEW_W;