From 779ce6788f52bdc588d12a3820c733bfdf017632 Mon Sep 17 00:00:00 2001 From: baizengqiang Date: Thu, 22 Aug 2024 15:27:42 +0800 Subject: [PATCH] delete module frame rectify Signed-off-by: baizengqiang --- BUILD.gn | 1 - figures/graphic.png | Bin 46331 -> 0 bytes .../server/src/animation_module.cpp | 156 ---------- interfaces/inner_api/wm/window_manager.h | 108 ------- .../inner_api/wm/window_manager_common.h | 45 --- .../wmclient/iscreen_shot_callback.h | 31 -- .../wmclient/iwindow_shot_callback.h | 31 -- interfaces/inner_api/wmclient/subwindow.h | 45 --- .../inner_api/wmclient/subwindow_option.h | 45 --- .../wmclient/virtual_display_option.h | 46 --- interfaces/inner_api/wmclient/window.h | 83 ------ .../inner_api/wmclient/window_manager.h | 56 ---- .../inner_api/wmclient/window_manager_type.h | 115 ------- interfaces/inner_api/wmclient/window_option.h | 54 ---- interfaces/inner_api/wmclient/wm_common.h | 160 ---------- .../wmservice/iwindow_change_listener_clazz.h | 29 -- .../iwindow_manager_display_listener_clazz.h | 29 -- .../wmservice/iwindow_manager_service.h | 88 ------ .../wmservice/window_manager_service_client.h | 34 --- .../wmservice/window_manager_service_type.h | 61 ---- interfaces/kits/js/declaration/BUILD.gn | 29 -- .../js/declaration/api/@ohos.display.d.ts | 135 --------- .../kits/js/declaration/api/@ohos.window.d.ts | 81 ----- .../graphic/window_hap/entry/package.json | 1 - .../window_hap/entry/src/main/config.json | 63 ---- .../src/main/java/com/test/window/Test.java | 25 -- .../java/com/test/window/TestAbility.java | 31 -- .../entry/src/main/js/default/i18n/en-US.json | 6 - .../entry/src/main/js/default/i18n/zh-CN.json | 6 - .../src/main/js/default/pages/index/index.css | 24 -- .../src/main/js/default/pages/index/index.hml | 21 -- .../main/resources/base/element/string.json | 12 - .../src/main/resources/base/media/icon.png | Bin 6790 -> 0 bytes rosen/tools/gn_project_to_cmake.py | 190 ------------ utils/BUILD.gn | 50 ---- utils/cpudraw/BUILD.gn | 42 --- utils/cpudraw/export/cpudraw.h | 54 ---- utils/cpudraw/src/cpudraw.cpp | 77 ----- utils/gl_utils/BUILD.gn | 65 ---- utils/gl_utils/export/shader.h | 51 ---- utils/gl_utils/export/texture.h | 50 ---- utils/gl_utils/src/mock/shader.cpp | 73 ----- utils/gl_utils/src/mock/texture.cpp | 37 --- utils/gl_utils/src/shader.cpp | 159 ---------- utils/gl_utils/src/texture.cpp | 58 ---- utils/gslogger/BUILD.gn | 43 --- utils/gslogger/export/gslogger.h | 161 ---------- utils/gslogger/src/gslogger.cpp | 206 ------------- utils/lex_yacc/gen_flexlexer_header.py | 31 -- utils/lex_yacc/gen_lex_cpp.py | 32 -- utils/lex_yacc/gen_yacc_cpp.py | 32 -- utils/lex_yacc/lex_yacc.gni | 130 -------- utils/matrix/BUILD.gn | 22 -- utils/matrix/export/matrix.h | 149 --------- utils/option_parser/BUILD.gn | 41 --- utils/option_parser/export/option_parser.h | 166 ----------- utils/option_parser/src/option_parser.cpp | 282 ------------------ utils/promise/BUILD.gn | 22 -- utils/promise/export/promise.h | 99 ------ utils/raw_maker/BUILD.gn | 50 ---- utils/raw_maker/export/raw_maker.h | 64 ---- utils/raw_maker/src/raw_maker.cpp | 212 ------------- utils/raw_parser/BUILD.gn | 47 --- utils/raw_parser/data/generate_raw.sh | 132 -------- utils/raw_parser/export/raw_parser.h | 103 ------- utils/raw_parser/src/raw_parser.cpp | 162 ---------- utils/scoped_bytrace/BUILD.gn | 47 --- utils/scoped_bytrace/export/scoped_bytrace.h | 47 --- .../scoped_bytrace/export/scoped_trace_fmt.h | 32 -- utils/scoped_bytrace/src/scoped_bytrace.cpp | 55 ---- utils/semaphore/BUILD.gn | 41 --- utils/semaphore/export/local_semaphore.h | 35 --- utils/semaphore/src/local_semaphore.cpp | 44 --- utils/wmlayout/gen_scss.py | 33 -- utils/wmlayout/wmlayout.gni | 59 ---- 75 files changed, 5136 deletions(-) delete mode 100644 figures/graphic.png delete mode 100644 frameworks/animation_server/server/src/animation_module.cpp delete mode 100755 interfaces/inner_api/wm/window_manager.h delete mode 100644 interfaces/inner_api/wm/window_manager_common.h delete mode 100644 interfaces/inner_api/wmclient/iscreen_shot_callback.h delete mode 100644 interfaces/inner_api/wmclient/iwindow_shot_callback.h delete mode 100644 interfaces/inner_api/wmclient/subwindow.h delete mode 100644 interfaces/inner_api/wmclient/subwindow_option.h delete mode 100644 interfaces/inner_api/wmclient/virtual_display_option.h delete mode 100755 interfaces/inner_api/wmclient/window.h delete mode 100644 interfaces/inner_api/wmclient/window_manager.h delete mode 100644 interfaces/inner_api/wmclient/window_manager_type.h delete mode 100644 interfaces/inner_api/wmclient/window_option.h delete mode 100755 interfaces/inner_api/wmclient/wm_common.h delete mode 100644 interfaces/inner_api/wmservice/iwindow_change_listener_clazz.h delete mode 100644 interfaces/inner_api/wmservice/iwindow_manager_display_listener_clazz.h delete mode 100644 interfaces/inner_api/wmservice/iwindow_manager_service.h delete mode 100644 interfaces/inner_api/wmservice/window_manager_service_client.h delete mode 100644 interfaces/inner_api/wmservice/window_manager_service_type.h delete mode 100644 interfaces/kits/js/declaration/BUILD.gn delete mode 100644 interfaces/kits/js/declaration/api/@ohos.display.d.ts delete mode 100644 interfaces/kits/js/declaration/api/@ohos.window.d.ts delete mode 100644 interfaces/kits/napi/graphic/window_hap/entry/package.json delete mode 100644 interfaces/kits/napi/graphic/window_hap/entry/src/main/config.json delete mode 100644 interfaces/kits/napi/graphic/window_hap/entry/src/main/java/com/test/window/Test.java delete mode 100644 interfaces/kits/napi/graphic/window_hap/entry/src/main/java/com/test/window/TestAbility.java delete mode 100644 interfaces/kits/napi/graphic/window_hap/entry/src/main/js/default/i18n/en-US.json delete mode 100644 interfaces/kits/napi/graphic/window_hap/entry/src/main/js/default/i18n/zh-CN.json delete mode 100644 interfaces/kits/napi/graphic/window_hap/entry/src/main/js/default/pages/index/index.css delete mode 100644 interfaces/kits/napi/graphic/window_hap/entry/src/main/js/default/pages/index/index.hml delete mode 100644 interfaces/kits/napi/graphic/window_hap/entry/src/main/resources/base/element/string.json delete mode 100644 interfaces/kits/napi/graphic/window_hap/entry/src/main/resources/base/media/icon.png delete mode 100644 rosen/tools/gn_project_to_cmake.py delete mode 100644 utils/cpudraw/BUILD.gn delete mode 100644 utils/cpudraw/export/cpudraw.h delete mode 100644 utils/cpudraw/src/cpudraw.cpp delete mode 100644 utils/gl_utils/BUILD.gn delete mode 100644 utils/gl_utils/export/shader.h delete mode 100644 utils/gl_utils/export/texture.h delete mode 100644 utils/gl_utils/src/mock/shader.cpp delete mode 100644 utils/gl_utils/src/mock/texture.cpp delete mode 100644 utils/gl_utils/src/shader.cpp delete mode 100644 utils/gl_utils/src/texture.cpp delete mode 100644 utils/gslogger/BUILD.gn delete mode 100644 utils/gslogger/export/gslogger.h delete mode 100644 utils/gslogger/src/gslogger.cpp delete mode 100755 utils/lex_yacc/gen_flexlexer_header.py delete mode 100755 utils/lex_yacc/gen_lex_cpp.py delete mode 100755 utils/lex_yacc/gen_yacc_cpp.py delete mode 100644 utils/lex_yacc/lex_yacc.gni delete mode 100644 utils/matrix/BUILD.gn delete mode 100644 utils/matrix/export/matrix.h delete mode 100644 utils/option_parser/BUILD.gn delete mode 100644 utils/option_parser/export/option_parser.h delete mode 100644 utils/option_parser/src/option_parser.cpp delete mode 100644 utils/promise/BUILD.gn delete mode 100644 utils/promise/export/promise.h delete mode 100644 utils/raw_maker/BUILD.gn delete mode 100644 utils/raw_maker/export/raw_maker.h delete mode 100644 utils/raw_maker/src/raw_maker.cpp delete mode 100644 utils/raw_parser/BUILD.gn delete mode 100755 utils/raw_parser/data/generate_raw.sh delete mode 100644 utils/raw_parser/export/raw_parser.h delete mode 100644 utils/raw_parser/src/raw_parser.cpp delete mode 100644 utils/scoped_bytrace/BUILD.gn delete mode 100644 utils/scoped_bytrace/export/scoped_bytrace.h delete mode 100644 utils/scoped_bytrace/export/scoped_trace_fmt.h delete mode 100644 utils/scoped_bytrace/src/scoped_bytrace.cpp delete mode 100644 utils/semaphore/BUILD.gn delete mode 100644 utils/semaphore/export/local_semaphore.h delete mode 100644 utils/semaphore/src/local_semaphore.cpp delete mode 100755 utils/wmlayout/gen_scss.py delete mode 100644 utils/wmlayout/wmlayout.gni diff --git a/BUILD.gn b/BUILD.gn index 1e86c55a26..4377c096f4 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -12,7 +12,6 @@ # limitations under the License. import("//build/ohos.gni") -import("//foundation/graphic/graphic_2d/utils/wmlayout/wmlayout.gni") import("graphic_config.gni") group("default") { diff --git a/figures/graphic.png b/figures/graphic.png deleted file mode 100644 index b72003f5221553d66ae4b4183f92bcfcac595bc2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 46331 zcmcG#bzEE9x;EMtS|~21P_$TSahG5%?i6>Yh2rkgQrz9$U5mR0mtw(-OK`V@n{=&x z_B#7pdw=Ji-@Sh%8FOZiF~@7qYjXyDloLlsAw+rf=n=Z4goxs!N00X(J$f>V{0ufC z&cafK{qfjdQC#Rz`6%%&>;Tc^gY1V#kE$Y2?+u>9j-T5|XxKk`gwYNEJO)}98b5mU zBT`c2gR+b6ej1X8a_=RuBKYFwd=5nI>jHvvAKCm?tSqk?tk?eM}tvO>VQ}&mQoxRUoSGb(#lakoBhZ~!J8S*u`J}y^3 zHv$>-KMcKn59$mHAeyc_A$Lyooto3JQH-gmJ^1ENLuy6vpw0KPs`05oz&B=Dvvq(H zGF4M97+<2nmUn_$r~UofSsxdgd2o)TMni!ss*Fq5_$3cE?27H|mzS!6~-C)(OA*^Ua`x4eKj$(iIUQWok?&X8Ppec zM^ngGUWvuxCmKixI5Z~1AWjRx5aU{-ta{$;4%bT47W3ytY3<)X{Y#KVx$#wdRi(p&+LD_`=Kg z@0BpQq%7}0y1B(wqFe^Fye|(UO4xaJ?W0mDxS;~>6KpNP2sh3}B_3@;BOV!Hm3E3(eEGT?Ui6`7#72{Yb?jYhPWt*tq|&t~Cl)P4Od4l2 z2*FKMG>g}iTr+)T^;3QI?jk&Q%ys2Q5#|{dB?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wmpb=n-8i8$RPVLnrgo zLECOVZh)j%{Mz~{;LDWulU$0x5%%g!o5k0ffmq{|nQ4yOtUt5sQnZTR$z(YY`q~B< zqLDljYV$W7+se}CZq_mLc68dN@|Sg!joA>*t-)o6%Qk6*3V9^9L{WA&yC^-KP{hct zg@1cx`HS$;DMS6q6I|M{+zo$@_%BEDh-V>Z0iWQfIz03RF z`QroG(vxCnH;djDS(`fGy=DP87!u$a1nE}-15Uv75)P)SpZajS_3lp zUTocX_l?Kc*Z9-=Pfss)u7-6Of5IjG;hG&2jCN79Y$<89R!z@~{#Ql$F4c5$Ug7aa zWd1c!0d_1#Bh{(@`XUwuC7%8}-~;O6U|~_iahg?BRK$PtPokxN_NI~WA00ud=Y&`! f)>m?JT)!WT1Dg`lo84@}!5*qgT8dQ)pm+Zd{cUQ! diff --git a/frameworks/animation_server/server/src/animation_module.cpp b/frameworks/animation_server/server/src/animation_module.cpp deleted file mode 100644 index 309d6ab37b..0000000000 --- a/frameworks/animation_server/server/src/animation_module.cpp +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (c) 2021 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. - */ - -#include "animation_module.h" - -#include - -#include -#include -#include - -namespace OHOS { -namespace { -DEFINE_HILOG_LABEL("AnimationModule"); -} // namespace - -GSError AnimationModule::Init() -{ - handler = AppExecFwk::EventHandler::Current(); - vhelper = VsyncHelper::Current(); - auto wm = WindowManager::GetInstance(); - auto option = WindowOption::Get(); - option->SetWindowType(WINDOW_TYPE_ANIMATION); - auto wret = wm->CreateWindow(window, option); - if (wret != GSERROR_OK || window == nullptr) { - GSLOG2HI(ERROR) << "WindowManager::CreateWindow failed: " << GSErrorStr(wret); - return wret; - } - - window->Hide(); - auto producer = window->GetProducer(); - return GSERROR_OK; -} - -GSError AnimationModule::StartRotationAnimation(int32_t did, int32_t degree) -{ - if (isAnimationRunning == false) { - struct Animation animation { - .degree = degree, - .retval = new Promise(), - }; - handler->PostTask(std::bind(&AnimationModule::StartAnimation, this, std::ref(animation))); - return animation.retval->Await(); - } - return GSERROR_ANIMATION_RUNNING; -} - -void AnimationModule::OnScreenShot(const struct WMImageInfo &info) -{ - int32_t length = info.size; - struct AnimationScreenshotInfo ainfo = { - .wmimage = info, - .ptr = nullptr, - }; - if (info.wret != GSERROR_OK) { - screenshotPromise->Resolve(ainfo); - return; - } - - ainfo.ptr = std::make_shared(); - ainfo.ptr->ptr = std::make_unique(length); - ainfo.wmimage.data = ainfo.ptr.get(); - if (memcpy_s(ainfo.ptr->ptr.get(), length, info.data, info.size) != EOK) { - GSLOG2HI(ERROR) << "memcpy_s failed: " << strerror(errno); - ainfo.wmimage.wret = static_cast(GSERROR_INTERNAL); - screenshotPromise->Resolve(ainfo); - return; - } - - screenshotPromise->Resolve(ainfo); -} - -void AnimationModule::StartAnimation(struct Animation &animation) -{ - if (isAnimationRunning) { - animation.retval->Resolve(GSERROR_ANIMATION_RUNNING); - return; - } - - ScopedBytrace trace(__func__); - isAnimationRunning = true; - GSLOG2HI(INFO) << "Animation Start"; - window->Hide(); - auto wm = WindowManager::GetInstance(); - screenshotPromise = new Promise(); - wm->ListenNextScreenShot(0, this); - auto asinfo = screenshotPromise->Await(); - if (asinfo.wmimage.wret) { - GSLOG2HI(ERROR) << "OnScreenShot failed: " << GSErrorStr(asinfo.wmimage.wret); - animation.retval->Resolve(static_cast(asinfo.wmimage.wret)); - isAnimationRunning = false; - return; - } - - window->Show(); - - auto sret = eglSurface->InitContext(); - if (sret != GSERROR_OK) { - GSLOG2HI(ERROR) << "EGLSurface InitContext failed: " << sret; - animation.retval->Resolve(static_cast(sret)); - isAnimationRunning = false; - return; - } - - ranimation = std::make_unique(); - constexpr int32_t rotationAnimationDuration = 500; - auto now = std::chrono::duration_cast( - std::chrono::steady_clock::now().time_since_epoch()).count(); - struct RotationAnimationParam param = { - .data = asinfo.ptr, - .width = window->GetWidth(), - .height = window->GetHeight(), - .startTime = now, - .duration = rotationAnimationDuration, - .degree = animation.degree, - }; - auto gret = ranimation->Init(param); - if (gret != GSERROR_OK) { - GSLOG2HI(ERROR) << "RotationAnimation Init failed: " << GSErrorStr(gret); - animation.retval->Resolve(gret); - isAnimationRunning = false; - return; - } - - struct FrameCallback cb = { .callback_ = std::bind(&AnimationModule::AnimationSync, this, SYNC_FUNC_ARG) }; - animation.retval->Resolve(static_cast(vhelper->RequestFrameCallback(cb))); -} - -void AnimationModule::AnimationSync(int64_t time, void *data) -{ - ScopedBytrace trace(__func__); - if (ranimation->Draw()) { - eglSurface->SwapBuffers(); - struct FrameCallback cb = { .callback_ = std::bind(&AnimationModule::AnimationSync, this, SYNC_FUNC_ARG) }; - vhelper->RequestFrameCallback(cb); - trace.End(); - } else { - trace.End(); - GSLOG2HI(INFO) << "Animation End"; - window->Hide(); - isAnimationRunning = false; - } -} -} // namespace OHOS diff --git a/interfaces/inner_api/wm/window_manager.h b/interfaces/inner_api/wm/window_manager.h deleted file mode 100755 index 9202523598..0000000000 --- a/interfaces/inner_api/wm/window_manager.h +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2021 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 INTERFACES_INNERKITS_WM_WINDOW_MANAGER_H -#define INTERFACES_INNERKITS_WM_WINDOW_MANAGER_H - -#include "window_manager_common.h" - -#include -#include - -#include -#include -#include <../wmclient/iscreen_shot_callback.h> -#include <../wmclient/iwindow_shot_callback.h> - -namespace OHOS { -/** - * @brief The IWindowManager class is an abstract definition of windows manager. - * Provides a series of client/interfaces for window management, event processing, etc. - */ - -class WindowBase { -public: - WindowBase(int32_t windowid, sptr& surface); - virtual ~WindowBase(); - - void GetRequestConfig(BufferRequestConfig &config); - void SetRequestConfig(BufferRequestConfig &config); - void RegisterWindowInfoChangeCb(funcWindowInfoChange cb); - - int32_t GetWindowID(); - virtual sptr GetSurface(); - -protected: - int32_t m_windowid; - sptr surface_; - BufferRequestConfig config_; -}; - -class Window : public WindowBase { -public: - Window(int32_t windowid, sptr& surface); - ~Window(); - - void Show(); - void Hide(); - void Move(int32_t x, int32_t y); - void SwitchTop(); - void ChangeWindowType(WindowType type); - void ReSize(int32_t width, int32_t height); - void Rotate(rotateType type); - void RegisterOnWindowCreateCb(void(* cb)(uint32_t pid)); -}; - -class SubWindow : public WindowBase { -public: - SubWindow(int32_t windowid, sptr& surface); - virtual ~SubWindow(); - - virtual void Move(int32_t x, int32_t y); - virtual void SetSubWindowSize(int32_t width, int32_t height); -}; - -class ScreenShotCallback : public RefBase { -public: - virtual void OnScreenShot(const struct WMImageInfo &info){} -}; - -class WindowShotCallback : public RefBase { -public: - virtual void OnWindowShot(const struct WMImageInfo &info){} -}; - -class WindowManager : public RefBase { -public: - static sptr GetInstance(); - - std::unique_ptr CreateWindow(WindowConfig *config); - std::unique_ptr CreateSubWindow(int32_t parentid, WindowConfig *config); - void StartShotScreen(IScreenShotCallback *cb); - void StartShotWindow(int32_t id, IWindowShotCallback *cb); - int32_t GetMaxWidth(); - int32_t GetMaxHeight(); - void SwitchTop(int windowId); - void DestroyWindow(int windowId); -private: - static sptr instance; - WindowManager(); - virtual ~WindowManager(); - - void init(); -}; -} - -#endif // INTERFACES_INNERKITS_WM_WINDOW_MANAGER_H diff --git a/interfaces/inner_api/wm/window_manager_common.h b/interfaces/inner_api/wm/window_manager_common.h deleted file mode 100644 index 9cbb5ad5e3..0000000000 --- a/interfaces/inner_api/wm/window_manager_common.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2021 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 INTERFACES_INNERKITS_WM_WINDOW_MANAGER_COMMON_H -#define INTERFACES_INNERKITS_WM_WINDOW_MANAGER_COMMON_H - -#include "wmclient/wm_common.h" - -namespace OHOS { -typedef enum { - WINDOW_LAYER_DEFINE_NORMAL_ID = 5000, - WINDOW_LAYER_DEFINE_STATUSBAR_ID = 6000, - WINDOW_LAYER_DEFINE_NAVIBAR_ID = 7000, - WINDOW_LAYER_DEFINE_ALARM_ID = 8000, -} LayerID; - -constexpr int32_t LAYER_ID_APP_TYPE_BASE = 5000; -constexpr int32_t LAYER_ID_TYPE_OFSSET = 1000; - -typedef enum { - SHOT_WINDOW = 0, - SHOT_SCREEN, - SHOT_INVALID -} ShotType; - -struct MoveReq { - int32_t id; - int32_t pos_x; - int32_t pos_y; -}; -} // namespace OHOS - -#endif // INTERFACES_INNERKITS_WM_WINDOW_MANAGER_COMMON_H diff --git a/interfaces/inner_api/wmclient/iscreen_shot_callback.h b/interfaces/inner_api/wmclient/iscreen_shot_callback.h deleted file mode 100644 index 296ee0861f..0000000000 --- a/interfaces/inner_api/wmclient/iscreen_shot_callback.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2021 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 INTERFACES_INNERKITS_WMCLIENT_ISCREEN_SHOT_CALLBACK_H -#define INTERFACES_INNERKITS_WMCLIENT_ISCREEN_SHOT_CALLBACK_H - -#include - -#include "window_manager_type.h" - -namespace OHOS { -class IScreenShotCallback { -public: - virtual ~IScreenShotCallback() = default; - virtual void OnScreenShot(const struct WMImageInfo &info) = 0; -}; -} // namespace OHOS - -#endif // INTERFACES_INNERKITS_WMCLIENT_ISCREEN_SHOT_CALLBACK_H diff --git a/interfaces/inner_api/wmclient/iwindow_shot_callback.h b/interfaces/inner_api/wmclient/iwindow_shot_callback.h deleted file mode 100644 index c7406e4006..0000000000 --- a/interfaces/inner_api/wmclient/iwindow_shot_callback.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2021 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 INTERFACES_INNERKITS_WMCLIENT_IWINDOW_SHOT_CALLBACK_H -#define INTERFACES_INNERKITS_WMCLIENT_IWINDOW_SHOT_CALLBACK_H - -#include - -#include "window_manager_type.h" - -namespace OHOS { -class IWindowShotCallback { -public: - virtual ~IWindowShotCallback() = default; - virtual void OnWindowShot(const struct WMImageInfo &info) = 0; -}; -} // namespace OHOS - -#endif // INTERFACES_INNERKITS_WMCLIENT_IWINDOW_SHOT_CALLBACK_H diff --git a/interfaces/inner_api/wmclient/subwindow.h b/interfaces/inner_api/wmclient/subwindow.h deleted file mode 100644 index 7b1d9a3137..0000000000 --- a/interfaces/inner_api/wmclient/subwindow.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2021 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 INTERFACES_INNERKITS_WMCLIENT_SUBWINDOW_H -#define INTERFACES_INNERKITS_WMCLIENT_SUBWINDOW_H - -#include -#include - -#include "window_manager_type.h" - -namespace OHOS { -using FrameAvailableFunc = std::function &buffer)>; -class Subwindow : public RefBase { -public: - virtual sptr GetSurface() const = 0; - - virtual GSError Move(int32_t x, int32_t y) = 0; - virtual GSError Resize(uint32_t width, uint32_t height) = 0; - virtual GSError Destroy() = 0; - - virtual void OnPositionChange(WindowPositionChangeFunc func) = 0; - virtual void OnSizeChange(WindowSizeChangeFunc func) = 0; - virtual void OnBeforeFrameSubmit(BeforeFrameSubmitFunc func) = 0; - - virtual GSError OnFrameAvailable(FrameAvailableFunc func) - { - return GSERROR_NOT_SUPPORT; - } -}; -} // namespace OHOS - -#endif // INTERFACES_INNERKITS_WMCLIENT_SUBWINDOW_H diff --git a/interfaces/inner_api/wmclient/subwindow_option.h b/interfaces/inner_api/wmclient/subwindow_option.h deleted file mode 100644 index 8b6218b033..0000000000 --- a/interfaces/inner_api/wmclient/subwindow_option.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2021 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 INTERFACES_INNERKITS_WMCLIENT_SUBWINDOW_OPTION_H -#define INTERFACES_INNERKITS_WMCLIENT_SUBWINDOW_OPTION_H - -#include -#include - -#include "window_manager_type.h" - -namespace OHOS { -class SubwindowOption : public RefBase { -public: - static sptr Get(); - - virtual GSError SetWindowType(SubwindowType type) = 0; - virtual GSError SetX(int32_t x) = 0; - virtual GSError SetY(int32_t y) = 0; - virtual GSError SetWidth(uint32_t w) = 0; - virtual GSError SetHeight(uint32_t h) = 0; - virtual GSError SetConsumerSurface(const sptr &surf) = 0; - - virtual SubwindowType GetWindowType() const = 0; - virtual int32_t GetX() const = 0; - virtual int32_t GetY() const = 0; - virtual uint32_t GetWidth() const = 0; - virtual uint32_t GetHeight() const = 0; - virtual sptr GetConsumerSurface() const = 0; -}; -} // namespace OHOS - -#endif // INTERFACES_INNERKITS_WMCLIENT_SUBWINDOW_OPTION_H diff --git a/interfaces/inner_api/wmclient/virtual_display_option.h b/interfaces/inner_api/wmclient/virtual_display_option.h deleted file mode 100644 index a145ff7a36..0000000000 --- a/interfaces/inner_api/wmclient/virtual_display_option.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2021 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 INTERFACES_INNERKITS_WMCLIENT_VIRTUAL_DISPLAY_OPTION_H -#define INTERFACES_INNERKITS_WMCLIENT_VIRTUAL_DISPLAY_OPTION_H - -#include -#include - -#include "window_manager_type.h" - -namespace OHOS { -class VirtualDisplayOption : public RefBase { -public: - static sptr Get(); - - virtual GSError SetX(int32_t x) = 0; - virtual GSError SetY(int32_t y) = 0; - virtual GSError SetWidth(uint32_t width) = 0; - virtual GSError SetHeight(uint32_t height) = 0; - - virtual int32_t GetX() const = 0; - virtual int32_t GetY() const = 0; - virtual uint32_t GetWidth() const = 0; - virtual uint32_t GetHeight() const = 0; - - virtual bool IsSettingX() const = 0; - virtual bool IsSettingY() const = 0; - virtual bool IsSettingWidth() const = 0; - virtual bool IsSettingHeight() const = 0; -}; -} // namespace OHOS - -#endif // INTERFACES_INNERKITS_WMCLIENT_VIRTUAL_DISPLAY_OPTION_H diff --git a/interfaces/inner_api/wmclient/window.h b/interfaces/inner_api/wmclient/window.h deleted file mode 100755 index 7a4f577618..0000000000 --- a/interfaces/inner_api/wmclient/window.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2021 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 INTERFACES_INNERKITS_WMCLIENT_WINDOW_H -#define INTERFACES_INNERKITS_WMCLIENT_WINDOW_H - -#include -#include -#include - -#include "window_manager_type.h" - -namespace OHOS { -class Window : public RefBase { -public: - virtual sptr GetSurface() const = 0; - virtual sptr GetProducer() const = 0; - virtual int32_t GetID() const = 0; - virtual int32_t GetX() const = 0; - virtual int32_t GetY() const = 0; - virtual uint32_t GetWidth() const = 0; - virtual uint32_t GetHeight() const = 0; - virtual uint32_t GetDestWidth() const = 0; - virtual uint32_t GetDestHeight() const = 0; - virtual bool GetVisibility() const = 0; - virtual WindowType GetType() const = 0; - virtual WindowMode GetMode() const = 0; - - virtual sptr> Show() = 0; - virtual sptr> Hide() = 0; - virtual sptr> Move(int32_t x, int32_t y) = 0; - virtual sptr> SwitchTop() = 0; - virtual sptr> SetWindowType(WindowType type) = 0; - virtual sptr> SetWindowMode(WindowMode mode) = 0; - virtual sptr> Resize(uint32_t width, uint32_t height) = 0; - virtual sptr> ScaleTo(uint32_t width, uint32_t height) = 0; - virtual GSError Rotate(WindowRotateType type) = 0; - virtual GSError Destroy() = 0; - - // prop listener - virtual void OnPositionChange(WindowPositionChangeFunc func) = 0; - virtual void OnSizeChange(WindowSizeChangeFunc func) = 0; - virtual void OnVisibilityChange(WindowVisibilityChangeFunc func) = 0; - virtual void OnTypeChange(WindowTypeChangeFunc func) = 0; - virtual void OnModeChange(WindowModeChangeFunc func) = 0; - virtual void OnSplitStatusChange(SplitStatusChangeFunc func) = 0; - virtual void OnBeforeFrameSubmit(BeforeFrameSubmitFunc func) = 0; - - // pip Mode - virtual bool GetPIPMode() const - { - return false; - } - - virtual GSError EnterPIPMode(int32_t x, int32_t y, - uint32_t width, uint32_t height) - { - return GSERROR_NOT_SUPPORT; - } - virtual GSError ExitPIPMode() - { - return GSERROR_NOT_SUPPORT; - } - virtual GSError OnPIPModeChange(WindowPIPModeChangeFunc func) - { - return GSERROR_NOT_SUPPORT; - } -}; -} // namespace OHOS - -#endif // INTERFACES_INNERKITS_WMCLIENT_WINDOW_H diff --git a/interfaces/inner_api/wmclient/window_manager.h b/interfaces/inner_api/wmclient/window_manager.h deleted file mode 100644 index 6387da7e1d..0000000000 --- a/interfaces/inner_api/wmclient/window_manager.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2021 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 INTERFACES_INNERKITS_WMCLIENT_WINDOW_MANAGER_H -#define INTERFACES_INNERKITS_WMCLIENT_WINDOW_MANAGER_H - -#include - -#include - -#include "iscreen_shot_callback.h" -#include "iwindow_shot_callback.h" -#include "subwindow.h" -#include "subwindow_option.h" -#include "window.h" -#include "window_manager_type.h" -#include "window_option.h" -#include "virtual_display_option.h" - -namespace OHOS { -class WindowManager : public RefBase { -public: - static sptr GetInstance(); - - virtual GSError Init() = 0; - - virtual GSError GetDisplays(std::vector &displays) const = 0; - virtual sptr GetWindowByID(int32_t wid) = 0; - - virtual GSError CreateWindow(sptr &window, const sptr &option) = 0; - virtual GSError CreateSubwindow(sptr &subwindow, - const sptr &window, - const sptr &option) = 0; - - virtual GSError ListenNextScreenShot(int32_t id, IScreenShotCallback *cb) = 0; - virtual GSError ListenNextWindowShot(const sptr &window, IWindowShotCallback *cb) = 0; - - virtual GSError CreateVirtualDisplay(const sptr &option) = 0; - virtual GSError DestroyVirtualDisplay(uint32_t did) = 0; - virtual GSError SetDisplayMode(WMSDisplayMode mode) = 0; -}; -} // namespace OHOS - -#endif // INTERFACES_INNERKITS_WMCLIENT_WINDOW_MANAGER_H diff --git a/interfaces/inner_api/wmclient/window_manager_type.h b/interfaces/inner_api/wmclient/window_manager_type.h deleted file mode 100644 index 03ee6abd55..0000000000 --- a/interfaces/inner_api/wmclient/window_manager_type.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) 2021 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 INTERFACES_INNERKITS_WMCLIENT_WINDOW_MANAGER_TYPE_H -#define INTERFACES_INNERKITS_WMCLIENT_WINDOW_MANAGER_TYPE_H - -#ifdef __cplusplus -#include -#include -#endif - -#include "wm_common.h" - -#include "common/graphic_common.h" - -#ifdef __cplusplus -namespace OHOS { -#endif - -enum SubwindowType { - SUBWINDOW_TYPE_NORMAL = 0, - SUBWINDOW_TYPE_VIDEO = 1, - SUBWINDOW_TYPE_OFFSCREEN = 2, - SUBWINDOW_TYPE_MAX, -}; - -enum WindowRotateType { - WINDOW_ROTATE_TYPE_NORMAL = 0, - WINDOW_ROTATE_TYPE_90 = 1, - WINDOW_ROTATE_TYPE_180 = 2, - WINDOW_ROTATE_TYPE_270 = 3, - WINDOW_ROTATE_TYPE_FLIPPED = 4, - WINDOW_ROTATE_TYPE_FLIPPED_90 = 5, - WINDOW_ROTATE_TYPE_FLIPPED_180 = 6, - WINDOW_ROTATE_TYPE_FLIPPED_270 = 7, - WINDOW_ROTATE_TYPE_MAX, -}; - -enum WindowMode { - WINDOW_MODE_UNSET = 0, - WINDOW_MODE_FULL = 1, - WINDOW_MODE_FREE = 2, - WINDOW_MODE_MAX, -}; - -// bitmask -enum WMSDisplayMode { - WM_DISPLAY_MODE_SINGLE = 1, - WM_DISPLAY_MODE_CLONE = 2, - WM_DISPLAY_MODE_EXTEND = 4, - WM_DISPLAY_MODE_EXPAND = 8, -}; - -enum DisplayType { - DISPLAY_TYPE_PHYSICAL = 0, - DISPLAY_TYPE_VIRTUAL, - DISPLAY_TYPE_MAX, -}; - -enum SplitStatus { - SPLIT_STATUS_CLEAR = 0, - SPLIT_STATUS_VAGUE = 1, - SPLIT_STATUS_RETAIN = 2, - SPLIT_STATUS_DESTROY = 3, - SPLIT_STATUS_MAX, -}; - -enum WindowSplitMode { - WINDOW_SPLIT_MODE_UNSET = 0, - WINDOW_SPLIT_MODE_SET = 1, - WINDOW_SPLIT_MODE_MAX, -}; - -enum SplitMode { - SPLIT_MODE_NULL = 0, - SPLIT_MODE_UNENABLE = 1, - SPLIT_MODE_SINGLE = 2, - SPLIT_MODE_SELECT = 3, - SPLIT_MODE_CONFIRM = 4, - SPLIT_MODE_DIVIDER_TOUCH_DOWN = 5, - SPLIT_MODE_DIVIDER_TOUCH_MOVE = 6, - SPLIT_MODE_DIVIDER_TOUCH_UP = 7, - SPLIT_MODE_MAX, -}; - -struct WMDisplayInfo { - int32_t id; - uint32_t width; - uint32_t height; - uint32_t phyWidth; - uint32_t phyHeight; - uint32_t vsync; - enum DisplayType type; -}; - -#ifdef __cplusplus -using WindowModeChangeFunc = std::function; -using BeforeFrameSubmitFunc = std::function; -using SplitStatusChangeFunc = std::function; -} // namespace OHOS -#endif - -#endif // INTERFACES_INNERKITS_WMCLIENT_WINDOW_MANAGER_TYPE_H diff --git a/interfaces/inner_api/wmclient/window_option.h b/interfaces/inner_api/wmclient/window_option.h deleted file mode 100644 index 31f93dd964..0000000000 --- a/interfaces/inner_api/wmclient/window_option.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2021 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 INTERFACES_INNERKITS_WMCLIENT_WINDOW_OPTION_H -#define INTERFACES_INNERKITS_WMCLIENT_WINDOW_OPTION_H - -#include -#include - -#include "window_manager_type.h" - -namespace OHOS { -class WindowOption : public RefBase { -public: - static sptr Get(); - - virtual GSError SetWindowType(WindowType type) = 0; - virtual GSError SetWindowMode(WindowMode mode) = 0; - virtual GSError SetDisplay(int32_t did) = 0; - virtual GSError SetConsumerSurface(const sptr &surf) = 0; - virtual GSError SetX(int32_t x) = 0; - virtual GSError SetY(int32_t y) = 0; - virtual GSError SetWidth(uint32_t width) = 0; - virtual GSError SetHeight(uint32_t height) = 0; - - virtual WindowType GetWindowType() const = 0; - virtual WindowMode GetWindowMode() const = 0; - virtual int32_t GetDisplay() const = 0; - virtual sptr GetConsumerSurface() const = 0; - virtual int32_t GetX() const = 0; - virtual int32_t GetY() const = 0; - virtual uint32_t GetWidth() const = 0; - virtual uint32_t GetHeight() const = 0; - - virtual bool IsSettingX() const = 0; - virtual bool IsSettingY() const = 0; - virtual bool IsSettingWidth() const = 0; - virtual bool IsSettingHeight() const = 0; -}; -} // namespace OHOS - -#endif // INTERFACES_INNERKITS_WMCLIENT_WINDOW_OPTION_H diff --git a/interfaces/inner_api/wmclient/wm_common.h b/interfaces/inner_api/wmclient/wm_common.h deleted file mode 100755 index 9f886b7dc8..0000000000 --- a/interfaces/inner_api/wmclient/wm_common.h +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright (c) 2021 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 INTERFACES_INNERKITS_WMCLIENT_WM_COMMON_H -#define INTERFACES_INNERKITS_WMCLIENT_WM_COMMON_H - -#ifdef __cplusplus -#include -#include -#include -#endif - -#include "common/graphic_common.h" - -#ifdef __cplusplus -namespace OHOS { -#endif - -#define WINDOW_TYPE_LIST(macro) \ - macro(WINDOW_TYPE_NORMAL), \ - macro(WINDOW_TYPE_STATUS_BAR), \ - macro(WINDOW_TYPE_NAVI_BAR), \ - macro(WINDOW_TYPE_ALARM_SCREEN), \ - macro(WINDOW_TYPE_SYSTEM_UI), \ - macro(WINDOW_TYPE_LAUNCHER), \ - macro(WINDOW_TYPE_VIDEO), \ - macro(WINDOW_TYPE_INPUT_METHOD), \ - macro(WINDOW_TYPE_INPUT_METHOD_SELECTOR), \ - macro(WINDOW_TYPE_VOLUME_OVERLAY), \ - macro(WINDOW_TYPE_NOTIFICATION_SHADE), \ - macro(WINDOW_TYPE_FLOAT), \ - macro(WINDOW_TYPE_CALLING), \ - macro(WINDOW_TYPE_FULL_SCREEN), \ - macro(WINDOW_TYPE_POPUP), \ - macro(WINDOW_TYPE_SAFE_OVERLAY), \ - macro(WINDOW_TYPE_SCREENSAVER_CALLING), \ - macro(WINDOW_TYPE_SCREENSAVER_DIALOG), \ - macro(WINDOW_TYPE_SCREENSAVER), \ - macro(WINDOW_TYPE_SEARCHER), \ - macro(WINDOW_TYPE_STATUS_SCREEN), \ - macro(WINDOW_TYPE_SYSTEM_ERROR), \ - macro(WINDOW_TYPE_TOAST), \ - macro(WINDOW_TYPE_WALLPAPER), \ - macro(WINDOW_TYPE_ANIMATION), \ - macro(WINDOW_TYPE_SPLIT_LINE), \ - macro(WINDOW_TYPE_LAUNCH_PAGE), \ - macro(WINDOW_TYPE_CURSOR), \ - macro(WINDOW_TYPE_APPLICATION_BASE), \ - macro(WINDOW_TYPE_APPLICATION_FIRST), \ - macro(WINDOW_TYPE_APPLICATION_NORMAL), \ - macro(WINDOW_TYPE_TOP), \ - macro(WINDOW_TYPE_MAX), - -#define DEFINE_ENUM_WINDOW_TYPE(id) id -#define DEFINE_STRMAP_WINDOW_TYPE(id) { #id, id, } - -enum WindowType { WINDOW_TYPE_LIST(DEFINE_ENUM_WINDOW_TYPE) }; - -#ifdef __cplusplus -static const std::map windowTypeStrs = { - WINDOW_TYPE_LIST(DEFINE_STRMAP_WINDOW_TYPE) -}; -#endif - -enum SubWindowType { - WM_WINDOW_TYPE_SUB_NORMAL = 0, - WM_WINDOW_TYPE_SUB_VIDEO = 1, -}; - -enum rotateType { - /** - * no transform - */ - WM_ROTATE_TYPE_NORMAL = 0, - /** - * 90 degrees counter-clockwise - */ - WM_ROTATE_TYPE_90 = 1, - /** - * 180 degrees counter-clockwise - */ - WM_ROTATE_TYPE_180 = 2, - /** - * 270 degrees counter-clockwise - */ - WM_ROTATE_TYPE_270 = 3, - /** - * 180 degree flip around a vertical axis - */ - WM_ROTATE_TYPE_FLIPPED = 4, - /** - * flip and rotate 90 degrees counter-clockwise - */ - WM_ROTATE_TYPE_FLIPPED_90 = 5, - /** - * flip and rotate 180 degrees counter-clockwise - */ - WM_ROTATE_TYPE_FLIPPED_180 = 6, - /** - * flip and rotate 270 degrees counter-clockwise - */ - WM_ROTATE_TYPE_FLIPPED_270 = 7, -}; - -struct WMImageInfo { - enum GSError wret; - uint32_t width; - uint32_t height; - uint32_t format; - uint32_t size; - const void *data; -}; - -struct WindowInfo { - int32_t width; - int32_t height; - int32_t pos_x; - int32_t pos_y; -}; - -#ifdef __cplusplus - -using funcWindowInfoChange = std::function; -using WindowPositionChangeFunc = std::function; -using WindowSizeChangeFunc = std::function; -using WindowVisibilityChangeFunc = std::function; -using WindowTypeChangeFunc = std::function; -using WindowPIPModeChangeFunc = std::function; -#endif - -typedef void (*FuncSync)(uint64_t timestamp); -struct WindowConfig { - int32_t width; - int32_t height; - int32_t pos_x; - int32_t pos_y; - int32_t format; - int32_t stride; - int32_t type; - int32_t parentid; - bool subwindow; - FuncSync sync; -}; -#ifdef __cplusplus -} // namespace OHOS -#endif // __cplusplus - -#endif // INTERFACES_INNERKITS_WMCLIENT_WM_COMMON_H diff --git a/interfaces/inner_api/wmservice/iwindow_change_listener_clazz.h b/interfaces/inner_api/wmservice/iwindow_change_listener_clazz.h deleted file mode 100644 index edd49956fd..0000000000 --- a/interfaces/inner_api/wmservice/iwindow_change_listener_clazz.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2021 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 INTERFACES_INNERKITS_WMSERVICE_IWINDOW_CHANGE_LISTENER_CLAZZ_H -#define INTERFACES_INNERKITS_WMSERVICE_IWINDOW_CHANGE_LISTENER_CLAZZ_H - -namespace OHOS { -class IWindowChangeListenerClazz { -public: - virtual ~IWindowChangeListenerClazz() = default; - - virtual void OnWindowCreate(int32_t pid, int32_t wid) = 0; - virtual void OnWindowDestroy(int32_t pid, int32_t wid) = 0; -}; -} // namespace OHOS - -#endif // INTERFACES_INNERKITS_WMSERVICE_IWINDOW_CHANGE_LISTENER_CLAZZ_H diff --git a/interfaces/inner_api/wmservice/iwindow_manager_display_listener_clazz.h b/interfaces/inner_api/wmservice/iwindow_manager_display_listener_clazz.h deleted file mode 100644 index 97087ca8a1..0000000000 --- a/interfaces/inner_api/wmservice/iwindow_manager_display_listener_clazz.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2021 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 INTERFACES_INNERKITS_WMSERVICE_IWINDOW_MANAGER_DISPLAY_LISTENER_CLAZZ_H -#define INTERFACES_INNERKITS_WMSERVICE_IWINDOW_MANAGER_DISPLAY_LISTENER_CLAZZ_H - -namespace OHOS { -class IWindowManagerDisplayListenerClazz { -public: - virtual ~IWindowManagerDisplayListenerClazz() = default; - - virtual void OnScreenPlugin(int32_t did) = 0; - virtual void OnScreenPlugout(int32_t did) = 0; -}; -} // namespace OHOS - -#endif // INTERFACES_INNERKITS_WMSERVICE_IWINDOW_MANAGER_DISPLAY_LISTENER_CLAZZ_H diff --git a/interfaces/inner_api/wmservice/iwindow_manager_service.h b/interfaces/inner_api/wmservice/iwindow_manager_service.h deleted file mode 100644 index 913a7401e6..0000000000 --- a/interfaces/inner_api/wmservice/iwindow_manager_service.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2021 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 INTERFACES_INNERKITS_WMSERVICE_IWINDOW_MANAGER_SERVICE_H -#define INTERFACES_INNERKITS_WMSERVICE_IWINDOW_MANAGER_SERVICE_H - -#include -#include -#include -#include - -#include "iwindow_change_listener_clazz.h" -#include "iwindow_manager_display_listener_clazz.h" - -#include "window_manager_service_type.h" - -namespace OHOS { -class IWindowManagerService : public RefBase { -public: - virtual ~IWindowManagerService() = default; - - virtual GSError GetDisplays(std::vector &displays) = 0; - virtual sptr GetDisplayPower(int32_t did) = 0; - virtual sptr SetDisplayPower(int32_t did, DispPowerStatus status) = 0; - virtual sptr GetDisplayBacklight(int32_t did) = 0; - virtual sptr SetDisplayBacklight(int32_t did, uint32_t level) = 0; - virtual sptr SetDisplayMode(WMSDisplayMode modes) = 0; - virtual sptr OnWindowListChange(IWindowChangeListenerClazz *listener) = 0; - virtual GSError GetDisplayModes(uint32_t &displayModes) = 0; - virtual GSError AddDisplayChangeListener(IWindowManagerDisplayListenerClazz *listener) = 0; - - virtual GSError SetDisplayDirection(WMSDisplayDirection direction) = 0; - virtual GSError OnDisplayDirectionChange(DisplayDirectionChangeFunc func) = 0; - - virtual sptr SetStatusBarVisibility(bool visibility) = 0; - virtual sptr SetNavigationBarVisibility(bool visibility) = 0; - - virtual sptr ShotScreen(int32_t did) = 0; - virtual sptr ShotWindow(int32_t wid) = 0; - - virtual sptr DestroyWindow(int32_t wid) = 0; - virtual sptr SwitchTop(int32_t wid) = 0; - virtual sptr Show(int32_t wid) = 0; - virtual sptr Hide(int32_t wid) = 0; - virtual sptr Move(int32_t wid, int32_t x, int32_t y) = 0; - virtual sptr Resize(int32_t wid, uint32_t width, uint32_t height) = 0; - virtual sptr ScaleTo(int32_t wid, uint32_t width, uint32_t height) = 0; - virtual sptr SetWindowType(int32_t wid, WindowType type) = 0; - virtual sptr SetWindowMode(int32_t wid, WindowMode mode) = 0; - - virtual sptr CreateVirtualDisplay(int32_t x, int32_t y, int32_t width, int32_t height) = 0; - virtual sptr DestroyVirtualDisplay(uint32_t did) = 0; - - virtual GSError StartRotationAnimation(uint32_t did, int32_t degree) - { - return GSERROR_NOT_SUPPORT; - } - - virtual sptr SetSplitMode(SplitMode mode, int32_t x = 0, int32_t y = 0) - { - return nullptr; - } - - virtual GSError CreateLaunchPage(const std::string &filename) - { - return GSERROR_NOT_SUPPORT; - } - - virtual GSError CancelLaunchPage() - { - return GSERROR_NOT_SUPPORT; - } -}; -} // namespace OHOS - -#endif // INTERFACES_INNERKITS_WMSERVICE_IWINDOW_MANAGER_SERVICE_H diff --git a/interfaces/inner_api/wmservice/window_manager_service_client.h b/interfaces/inner_api/wmservice/window_manager_service_client.h deleted file mode 100644 index 65e4b9fd17..0000000000 --- a/interfaces/inner_api/wmservice/window_manager_service_client.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2021 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 INTERFACES_INNERKITS_WMSERVICE_WINDOW_MANAGER_SERVICE_CLIENT_H -#define INTERFACES_INNERKITS_WMSERVICE_WINDOW_MANAGER_SERVICE_CLIENT_H - -#include - -#include "iwindow_manager_service.h" - -namespace OHOS { -class WindowManagerServiceClient : public RefBase { -public: - virtual ~WindowManagerServiceClient() = default; - static sptr GetInstance(); - - virtual GSError Init() = 0; - virtual sptr GetService() const = 0; -}; -} // namespace OHOS - -#endif // INTERFACES_INNERKITS_WMSERVICE_WINDOW_MANAGER_SERVICE_CLIENT_H diff --git a/interfaces/inner_api/wmservice/window_manager_service_type.h b/interfaces/inner_api/wmservice/window_manager_service_type.h deleted file mode 100644 index 600c0c7459..0000000000 --- a/interfaces/inner_api/wmservice/window_manager_service_type.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2021 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 INTERFACES_INNERKITS_WMSERVICE_WINDOW_MANAGER_SERVICE_TYPE_H -#define INTERFACES_INNERKITS_WMSERVICE_WINDOW_MANAGER_SERVICE_TYPE_H - -#include - -#include -#include - -namespace OHOS { -enum WMSDisplayDirection { - WMS_DISPLAY_DIRECTION_DOWN = 0, - WMS_DISPLAY_DIRECTION_LEFT = 1, - WMS_DISPLAY_DIRECTION_UP = 2, - WMS_DISPLAY_DIRECTION_RIGHT = 3, -}; - -using DisplayDirectionChangeFunc = std::function; - -struct WMSImageInfo { - GSError wret; - int32_t fd; - uint32_t width; - uint32_t height; - uint32_t stride; - uint32_t format; - uint64_t timestamp; -}; - -struct PowerStatus { - GSError wret; - DispPowerStatus status; -}; - -struct Backlight { - GSError wret; - uint32_t level; -}; - -using PromiseWMError = Promise; -using PromiseGSError = Promise; -using PromiseWMSImageInfo = Promise; -using PromisePowerStatus = Promise; -using PromiseBacklight = Promise; -} // namespace OHOS - -#endif // INTERFACES_INNERKITS_WMSERVICE_WINDOW_MANAGER_SERVICE_TYPE_H diff --git a/interfaces/kits/js/declaration/BUILD.gn b/interfaces/kits/js/declaration/BUILD.gn deleted file mode 100644 index f9a04bde9f..0000000000 --- a/interfaces/kits/js/declaration/BUILD.gn +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2021 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. - -import("//build/ohos/ace/ace.gni") - -js_declaration("window") { - sources = [ "./api" ] - - part_name = "graphic_2d" -} - -ohos_copy("window_declaration") { - sources = [ "./api" ] - - outputs = [ target_out_dir + "/$target_name/" ] - - module_source_dir = target_out_dir + "/$target_name" - module_install_name = "" -} diff --git a/interfaces/kits/js/declaration/api/@ohos.display.d.ts b/interfaces/kits/js/declaration/api/@ohos.display.d.ts deleted file mode 100644 index 96a059a1d5..0000000000 --- a/interfaces/kits/js/declaration/api/@ohos.display.d.ts +++ /dev/null @@ -1,135 +0,0 @@ -/* -* Copyright (c) 2021 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. -*/ - -/** - * interface of display manager - * @devices tv, phone, tablet, wearable - */ -declare namespace display { - /** - * get the default display - * @devices tv, phone, tablet, wearable - */ - function getDefaultDisplay(): Promise; - - /** - /** - * the state of display - * @devices tv, phone, tablet, wearable - */ - enum DisplayState { - /** - * unknown - */ - STATE_UNKNOWN = 0, - /** - * screen off - */ - STATE_OFF, - /** - * screen on - */ - STATE_ON, - /** - * doze, but it will update for some important system messages - */ - STATE_DOZE, - /** - * doze and not update - */ - STATE_DOZE_SUSPEND, - /** - * VR node - */ - STATE_VR, - /** - * screen on and not update - */ - STATE_ON_SUSPEND, - } - - /** - * Properties of display, it couldn't update automatically - * @devices tv, phone, tablet, wearable - */ - interface Display { - /** - * display id - */ - id: number; - - /** - * display name - */ - name: string; - - /** - * the display is alive - */ - alive: boolean; - - /** - * the state of display - */ - state: DisplayState; - - /** - * refresh rate, unit: Hz - */ - refreshRate: number; - - /** - * the rotation degrees of the display - */ - rotation: number; - - /** - * the width of display, unit: pixel - */ - width: number; - - /** - * the height of display, unit: pixel - */ - height: number; - - /** - * indicates the display resolution. - */ - densityDPI: number; - - /** - * indicates the display density in pixels. The value of a low-resolution display is 1.0 - */ - densityPixels: number; - - /** - * indicates the text scale density of a display. - */ - scaledDensity: number; - - /** - * the DPI on X-axis. - */ - xDPI: number; - - /** - * the DPI on Y-axis. - */ - yDPI: number; - } -} - -export default display; diff --git a/interfaces/kits/js/declaration/api/@ohos.window.d.ts b/interfaces/kits/js/declaration/api/@ohos.window.d.ts deleted file mode 100644 index e4f33d26f8..0000000000 --- a/interfaces/kits/js/declaration/api/@ohos.window.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Copyright (c) 2021 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. -*/ - -/** - * Window manager. - * @devices tv, phone, tablet, wearable. -*/ -declare namespace window { - /** - * Obtain the top window of the current application. - * @devices tv, phone, tablet, wearable. - */ - function getTopWindow(): Promise; - - /** - * The type of a window. - * @devices tv, phone, tablet, wearable. - */ - enum WindowType { - /** - * App. - */ - TYPE_APP = 0, - /** - * System alert. - */ - TYPE_SYSTEM_ALERT = 30, - /** - * System volume. - */ - TYPE_SYSTEM_VOLUME = 70, - /** - * System panel. - */ - TYPE_SYSTEM_PANEL = 90, - } - - /** - * The interface of window. - */ - interface Window { - /** - * Set the position of a window. - * @param x Indicate the X-coordinate of the window. - * @param y Indicate the Y-coordinate of the window. - * @devices tv, phone, tablet, wearable, liteWearable. - */ - moveTo(x: number, y: number): Promise; - - /** - * Set the size of a window . - * @param width Indicates the width of the window. - * @param height Indicates the height of the window. - * @devices tv, phone, tablet, wearable, liteWearable. - */ - resetSize(width: number, height: number): Promise; - - /** - * Set the type of a window. - * @param type Indicate the type of a window. - * @devices tv, phone, tablet, wearable, liteWearable. - */ - setWindowType(type: WindowType): Promise; - } - - function setSystemBarEnable(names: Array<'status' | 'navigation'>): Promise; -} - -export default window; diff --git a/interfaces/kits/napi/graphic/window_hap/entry/package.json b/interfaces/kits/napi/graphic/window_hap/entry/package.json deleted file mode 100644 index 0967ef424b..0000000000 --- a/interfaces/kits/napi/graphic/window_hap/entry/package.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/interfaces/kits/napi/graphic/window_hap/entry/src/main/config.json b/interfaces/kits/napi/graphic/window_hap/entry/src/main/config.json deleted file mode 100644 index 0fd2e1b3cc..0000000000 --- a/interfaces/kits/napi/graphic/window_hap/entry/src/main/config.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "app": { - "bundleName": "com.test.window", - "vendor": "test", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 5, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.test.window", - "name": ".Test", - "deviceType": [ - "tablet", - "2in1", - "default", - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry" - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "name": "com.test.window.Test", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "Test", - "type": "page", - "launchType": "standard" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} diff --git a/interfaces/kits/napi/graphic/window_hap/entry/src/main/java/com/test/window/Test.java b/interfaces/kits/napi/graphic/window_hap/entry/src/main/java/com/test/window/Test.java deleted file mode 100644 index d642315e7c..0000000000 --- a/interfaces/kits/napi/graphic/window_hap/entry/src/main/java/com/test/window/Test.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2021 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. - */ - -package com.test.window; - -import ohos.aafwk.ability.AbilityPackage; - -public class Test extends AbilityPackage { - @Override - public void onInitialize() { - super.onInitialize(); - } -} diff --git a/interfaces/kits/napi/graphic/window_hap/entry/src/main/java/com/test/window/TestAbility.java b/interfaces/kits/napi/graphic/window_hap/entry/src/main/java/com/test/window/TestAbility.java deleted file mode 100644 index 6d703889a1..0000000000 --- a/interfaces/kits/napi/graphic/window_hap/entry/src/main/java/com/test/window/TestAbility.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2021 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. - */ - -package com.test.window; - -import ohos.ace.ability.AceAbility; -import ohos.aafwk.content.Intent; - -public class TestAbility extends AceAbility { - @Override - public void onStart(Intent intent) { - super.onStart(intent); - } - - @Override - public void onStop() { - super.onStop(); - } -} diff --git a/interfaces/kits/napi/graphic/window_hap/entry/src/main/js/default/i18n/en-US.json b/interfaces/kits/napi/graphic/window_hap/entry/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978..0000000000 --- a/interfaces/kits/napi/graphic/window_hap/entry/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/interfaces/kits/napi/graphic/window_hap/entry/src/main/js/default/i18n/zh-CN.json b/interfaces/kits/napi/graphic/window_hap/entry/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee57483..0000000000 --- a/interfaces/kits/napi/graphic/window_hap/entry/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/interfaces/kits/napi/graphic/window_hap/entry/src/main/js/default/pages/index/index.css b/interfaces/kits/napi/graphic/window_hap/entry/src/main/js/default/pages/index/index.css deleted file mode 100644 index 2334ecfa2c..0000000000 --- a/interfaces/kits/napi/graphic/window_hap/entry/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2021 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. - */ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/interfaces/kits/napi/graphic/window_hap/entry/src/main/js/default/pages/index/index.hml b/interfaces/kits/napi/graphic/window_hap/entry/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 4c78ee43f9..0000000000 --- a/interfaces/kits/napi/graphic/window_hap/entry/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,21 +0,0 @@ - - -
    - - 你好地球 - {{ $t('strings.hello') }} {{title}} - -
    diff --git a/interfaces/kits/napi/graphic/window_hap/entry/src/main/resources/base/element/string.json b/interfaces/kits/napi/graphic/window_hap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 87c3980c33..0000000000 --- a/interfaces/kits/napi/graphic/window_hap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "Test" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} diff --git a/interfaces/kits/napi/graphic/window_hap/entry/src/main/resources/base/media/icon.png b/interfaces/kits/napi/graphic/window_hap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index 226d379f9583cddea07b799f3a45d4fa7cdd95f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmeHMU92hzzr9-+IMoK`syFuv&8EQz8?iQ3#q;m*?89+LvLxzwBLFtg^ zZ@n+SkM9q7cdZ+1-*vv6z1F?w?EO|pOO=>_jsO4v5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/gn_project_to_cmake.py deleted file mode 100644 index ebc1209cd6..0000000000 --- a/rosen/tools/gn_project_to_cmake.py +++ /dev/null @@ -1,190 +0,0 @@ -""" - * Copyright (c) 2021 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. -""" - -""" -gn gen --ide=json -1. modifty at ./build/core/build_scripts/make_main.sh - -${BUILD_TOOLS_DIR}/gn gen ${TARGET_OUT_DIR} --> ${BUILD_TOOLS_DIR}/gn gen --ide=json ${TARGET_OUT_DIR} - -2. build object --> generate project.json at out/ohos-arm-release/project.json - -3. python3 gn_project_to_cmake.py root_path_of_project(eg. home/xxxx/code/openharmony) - -to generate CMakeLists.txt at home/xxxx/code/openharmony -""" - -import datetime -import json -import os -import re -import sys -from pathlib import Path, PureWindowsPath -from typing import List - -def to_abs_path(path: str) -> str: - if path.startswith("//"): - path = path[2:] - return path - - -class GnTarget(object): - def __init__(self, full_name: str, content: object): - self.full_name = full_name - self.content = content - self.resolved = False - - @property - def dep_names(self) -> set: - return set(self.content.get('deps', [])) - - @property - def inputs_field(self) -> set: - return set(self.content.get('inputs', set())) - - @property - def sources_field(self) -> set: - return set(self.content.get('sources', set())) - - @property - def include_dirs_field(self) -> set: - return set(self.content.get('include_dirs', set())) - - def __filter_src_dirs(self, files) -> set: - return set(f.split("/src/")[0] + "/src" for f in files) - - @property - def cpp_src_files(self) -> set: - return set(to_abs_path(jf) for jf in self.sources_field - if - jf.endswith(".cpp") or jf.endswith(".h") or jf.endswith(".c++") or jf.endswith(".cc")) - - @property - def cpp_hdr_dirs(self) -> set: - return set(to_abs_path(x) for x in self.include_dirs_field if x != "//" and not x.startswith("//out")) - - -class ProjectJson(object): - def __init__(self, path: str): - self.path = path - with open(path, 'r') as project_file: - self.jobj = json.load(project_file) - - self.gn_targets_cache = dict() - project_targets = self.jobj['targets'] - for k, v in project_targets.items(): - if (k.find("rosen") < 0): - continue - print(k) - self.gn_targets_cache[k] = GnTarget(full_name=k, content=v) - - @property - def targets(self): - return self.gn_targets_cache.values() - - @property - def target_names(self): - return set([x.full_name for x in self.targets]) - - def find_targets_startswith(self, prefix: str) -> List[GnTarget]: - return [x for x in self.targets if x.full_name.startswith(prefix)] - - def get_target(self, name: str) -> GnTarget: - return next(x for x in self.targets if x.full_name == name) - - -class CMakeCreator(object): - def __init__(self, project_json: ProjectJson, project_root_dir: str): - self.project_json = project_json - self.project_root_dir = project_root_dir - self.project_name = os.path.basename(self.project_root_dir) - - @property - def project_cpp_srcs(self): - ret = set() - for x in self.project_json.targets: - for f in x.cpp_src_files: - f = os.path.join(self.project_root_dir, f) - if os.path.isfile(f): - ret.add(f) - print(f) - - return sorted(ret) - - @property - def project_cpp_hdrs(self): - ret = set() - for x in self.project_json.targets: - ret.update([_ for _ in x.cpp_hdr_dirs if os.path.isdir(self.project_root_dir + "/" + _)]) - return sorted(ret) - - @property - def jar_deps(self): - ret = set() - for x in self.project_json.targets: - ret.update([_ for _ in x.jar_files if os.path.isfile(self.project_root_dir + "/" + _)]) - return sorted(ret) - - def write_cmakelist(self): - hdr_list_str = "\n ".join(self.project_cpp_hdrs) - src_list_str = "\n ".join(self.project_cpp_srcs) - - project_name = self.project_name + "clion" - - with open(os.path.join(self.project_root_dir, 'CMakeLists.txt'), "w") as f: - f.write("""cmake_minimum_required(VERSION 3.15)\n""") - f.write("project(" + project_name + ")\n""") - f.write("set(CMAKE_CXX_STANDARD 17)\n") - f.write("include_directories(" + hdr_list_str + ")\n") - f.write("add_executable(" + project_name + " " + src_list_str + ")\n") - - with open(os.path.join(self.project_root_dir, 'CMakeLists.txt'), "w") as f: - f.write('# Generated by gn_project_to_cmake.py.\n') - f.write("""cmake_minimum_required(VERSION 3.15) -project({}clion) -set(CMAKE_CXX_STANDARD 17) -include_directories({}) -add_executable({}clion {}) - """.format(self.project_name, hdr_list_str, self.project_name, src_list_str)) - - def write(self): - self.write_cmakelist() - - -if __name__ == "__main__": - # - # read args - # - if len(sys.argv) < 2: - print("""Usage: {} , -eg. {} /home/xxxxxx/codes/openharmony""".format(sys.argv[0], sys.argv[0])) - sys.exit(1) - - project_root_dir = sys.argv[1] - if not os.path.isdir(project_root_dir): - print(project_root_dir + " not exist!") - sys.exit(1) - - # - # parse project.json - # - project_json = ProjectJson(path=os.path.join(*[project_root_dir, "out", "ohos-arm-release", "project.json"])) - print(project_json) - - # - # write CMakeLists.txt - # - CMakeCreator(project_json=project_json, project_root_dir=project_root_dir).write() - diff --git a/utils/BUILD.gn b/utils/BUILD.gn index 1a6bdce047..1063c9cdbb 100644 --- a/utils/BUILD.gn +++ b/utils/BUILD.gn @@ -21,18 +21,6 @@ group("color_manager") { ] } -group("scoped_bytrace") { - public_deps = [ "scoped_bytrace:scoped_bytrace" ] -} - -group("promise") { - public_deps = [ "promise:promise" ] -} - -group("semaphore") { - public_deps = [ "semaphore:semaphore" ] -} - group("socketpair") { public_deps = [ "socketpair:socketpair" ] } @@ -41,34 +29,6 @@ group("test_header") { public_deps = [ "test_header:test_header" ] } -group("option_parser") { - public_deps = [ "option_parser:option_parser" ] -} - -group("libgslogger") { - public_deps = [ "gslogger:libgslogger" ] -} - -group("matrix") { - public_deps = [ "matrix:matrix" ] -} - -group("raw_parser") { - public_deps = [ "raw_parser:raw_parser" ] -} - -group("cpudraw") { - public_deps = [ "cpudraw:cpudraw" ] -} - -group("gl_utils") { - public_deps = [ "gl_utils:gl_utils" ] -} - -group("raw_maker") { - public_deps = [ "raw_maker:raw_maker" ] -} - group("sandbox_utils") { public_deps = [ "sandbox:sandbox_utils" ] } @@ -95,17 +55,7 @@ ohos_shared_library("libgraphic_utils") { deps = [ ":color_manager", - ":cpudraw", - ":gl_utils", - ":libgslogger", - ":matrix", - ":option_parser", - ":promise", - ":raw_maker", - ":raw_parser", ":sandbox_utils", - ":scoped_bytrace", - ":semaphore", ":test_header", ] diff --git a/utils/cpudraw/BUILD.gn b/utils/cpudraw/BUILD.gn deleted file mode 100644 index 50891d43ad..0000000000 --- a/utils/cpudraw/BUILD.gn +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) 2021 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. - -import("//build/ohos.gni") - -## Build cpudraw.a {{{ -config("cpudraw_config") { - visibility = [ ":*" ] - - cflags = [ - "-Wall", - "-Werror", - "-g3", - ] -} - -config("cpudraw_public_config") { - include_dirs = [ "export" ] -} - -ohos_static_library("cpudraw") { - sources = [ "src/cpudraw.cpp" ] - - configs = [ ":cpudraw_config" ] - - public_configs = [ ":cpudraw_public_config" ] - - deps = [ "..:scoped_bytrace" ] - subsystem_name = "graphic" - part_name = "graphic_2d" -} -## Build cpudraw.a }}} diff --git a/utils/cpudraw/export/cpudraw.h b/utils/cpudraw/export/cpudraw.h deleted file mode 100644 index c6de9807e7..0000000000 --- a/utils/cpudraw/export/cpudraw.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2021 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 UTILS_INCLUDE_CPUDRAW_EXPORT_CPUDRAW_H -#define UTILS_INCLUDE_CPUDRAW_EXPORT_CPUDRAW_H - -#include - -struct CpudrawRect { - double x; - double y; - double w; - double h; - - bool Contain(int32_t x2, int32_t y2); -}; - -class Cpudraw { -public: - Cpudraw(uint32_t *vaddr, int32_t width, int32_t height); - - void SetColor(const uint32_t &color); - void SetBorder(const int32_t &border); - - void DrawBorder(const int32_t &x, const int32_t &y, const int32_t &w, const int32_t &h); - void DrawBorder(const struct CpudrawRect &rect); - - void DrawRect(const int32_t &x, const int32_t &y, const int32_t &w, const int32_t &h); - void DrawRect(const struct CpudrawRect &rect); - -private: - int32_t Min(const int32_t &a, const int32_t &b); - int32_t Max(const int32_t &a, const int32_t &b); - - uint32_t *addr = nullptr; - int32_t width = 0; - int32_t height = 0; - uint32_t color = 0xffffffff; - int32_t border = 0; -}; - -#endif // UTILS_INCLUDE_CPUDRAW_EXPORT_CPUDRAW_H diff --git a/utils/cpudraw/src/cpudraw.cpp b/utils/cpudraw/src/cpudraw.cpp deleted file mode 100644 index 05f067296d..0000000000 --- a/utils/cpudraw/src/cpudraw.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2021 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. - */ - -#include "cpudraw.h" - -#include - -bool CpudrawRect::Contain(int32_t x2, int32_t y2) -{ - return x <= x2 && x2 <= x + w && y <= y2 && y2 <= y + h; -} - -Cpudraw::Cpudraw(uint32_t *vaddr, int32_t width, int32_t height) - : addr(vaddr), width(width), height(height) -{ -} - -void Cpudraw::SetColor(const uint32_t &color) -{ - this->color = color; -} - -void Cpudraw::SetBorder(const int32_t &border) -{ - this->border = border; -} - -void Cpudraw::DrawBorder(const struct CpudrawRect &rect) -{ - DrawBorder(rect.x, rect.y, rect.w, rect.h); -} - -void Cpudraw::DrawBorder(const int32_t &x, const int32_t &y, const int32_t &w, const int32_t &h) -{ - ScopedBytrace trace(__func__); - DrawRect(x, y, border, h); - DrawRect(x + w - border, y, border, h); - DrawRect(x, y, w, border); - DrawRect(x, y + h - border, w, border); -} - -void Cpudraw::DrawRect(const struct CpudrawRect &rect) -{ - DrawRect(rect.x, rect.y, rect.w, rect.h); -} - -void Cpudraw::DrawRect(const int32_t &x, const int32_t &y, const int32_t &w, const int32_t &h) -{ - ScopedBytrace trace(__func__); - for (int32_t j = Max(y, 0); j < Min(y + h, height); j++) { - for (int32_t i = Max(x, 0); i < Min(x + w, width); i++) { - addr[j * width + i] = color; - } - } -} - -int32_t Cpudraw::Min(const int32_t &a, const int32_t &b) -{ - return a < b ? a : b; -} - -int32_t Cpudraw::Max(const int32_t &a, const int32_t &b) -{ - return a > b ? a : b; -} diff --git a/utils/gl_utils/BUILD.gn b/utils/gl_utils/BUILD.gn deleted file mode 100644 index b993cefcb3..0000000000 --- a/utils/gl_utils/BUILD.gn +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright (c) 2021 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. - -import("//build/ohos.gni") -import("//foundation/graphic/graphic_2d/graphic_config.gni") - -## Build gl_utils.a {{{ -config("gl_utils_config") { - visibility = [ ":*" ] - - cflags = [ - "-Wall", - "-Werror", - "-g3", - ] - - if (!ace_enable_gpu) { - cflags += [ "-Wno-unused-private-field" ] - } -} - -config("gl_utils_public_config") { - include_dirs = [ "export" ] -} - -ohos_static_library("gl_utils") { - sources = [] - - if (ace_enable_gpu) { - sources += [ - "src/shader.cpp", - "src/texture.cpp", - ] - } else { - sources += [ - "src/mock/shader.cpp", - "src/mock/texture.cpp", - ] - } - - configs = [ ":gl_utils_config" ] - - public_configs = [ ":gl_utils_public_config" ] - - public_deps = [ - "$graphic_2d_root/frameworks/opengl_wrapper:EGL", - "$graphic_2d_root/frameworks/opengl_wrapper:GLESv3", - "..:libgslogger", - "..:matrix", - ] - - part_name = "graphic_2d" - subsystem_name = "graphic" -} -## Build gl_utils.a }}} diff --git a/utils/gl_utils/export/shader.h b/utils/gl_utils/export/shader.h deleted file mode 100644 index dc6980ce9d..0000000000 --- a/utils/gl_utils/export/shader.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2021 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 FRAMEWORKS_ANIMATION_SERVER_SERVER_INCLUDE_SHADER_H -#define FRAMEWORKS_ANIMATION_SERVER_SERVER_INCLUDE_SHADER_H - -#include -#include -#include - -#include - -class Shader { -public: - Shader(const std::string& vertexSource, const std::string& fragmentSource); - ~Shader(); - - bool Available(); - - void Bind() const; - void Unbind() const; - - void SetUniform1i(const std::string& name, int32_t v); - void SetUniform1f(const std::string& name, float v); - void SetUniform4f(const std::string& name, float v0, float v1, float v2, float v3); - void SetUniformMat4f(const std::string& name, const Matrix& matrix); - - int32_t GetAttribLocation(const std::string& name); - -private: - int32_t GetUniformLocation(const std::string& name); - uint32_t CompileShader(uint32_t type, const std::string& source); - uint32_t CreateShader(const std::string& vertexShader, const std::string& fragmentShader); - - uint32_t rendererID_ = 0; - std::unordered_map uniformLocationCache_; -}; - -#endif // FRAMEWORKS_ANIMATION_SERVER_SERVER_INCLUDE_SHADER_H diff --git a/utils/gl_utils/export/texture.h b/utils/gl_utils/export/texture.h deleted file mode 100644 index 644989715b..0000000000 --- a/utils/gl_utils/export/texture.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2021 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 FRAMEWORKS_ANIMATION_SERVER_SERVER_INCLUDE_TEXTURE_H -#define FRAMEWORKS_ANIMATION_SERVER_SERVER_INCLUDE_TEXTURE_H - -#include - -class Texture { -public: - // from buffer - Texture(void *buffer, int32_t width, int32_t height); - - // from texture - Texture(uint32_t texture); - ~Texture(); - - void Bind(uint32_t slot = 0) const; - void Unbind(); - - inline int32_t GetWidth() const - { - return width_; - } - - inline int32_t GetHeight() const - { - return height_; - } - -private: - uint32_t rendererID_ = 0; - void *buffer_ = nullptr; - int32_t width_ = 0; - int32_t height_ = 0; -}; - -#endif // FRAMEWORKS_ANIMATION_SERVER_SERVER_INCLUDE_TEXTURE_H diff --git a/utils/gl_utils/src/mock/shader.cpp b/utils/gl_utils/src/mock/shader.cpp deleted file mode 100644 index ccec4f3fa7..0000000000 --- a/utils/gl_utils/src/mock/shader.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2021 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. - */ - -#include "shader.h" - -Shader::Shader(const std::string& vertexSource, const std::string& fragmentSource) -{ -} - -Shader::~Shader() -{ -} - -bool Shader::Available() -{ - return false; -} - -void Shader::Bind() const -{ -} - -void Shader::Unbind() const -{ -} - -void Shader::SetUniform1i(const std::string& name, int32_t v) -{ -} - -void Shader::SetUniform1f(const std::string& name, float v) -{ -} - -void Shader::SetUniform4f(const std::string& name, float v0, float v1, float v2, float v3) -{ -} - -void Shader::SetUniformMat4f(const std::string& name, const Matrix& matrix) -{ -} - -int32_t Shader::GetAttribLocation(const std::string& name) -{ - return -1; -} - -int32_t Shader::GetUniformLocation(const std::string& name) -{ - return -1; -} - -uint32_t Shader::CompileShader(uint32_t type, const std::string& source) -{ - return -1; -} - -uint32_t Shader::CreateShader(const std::string& vertexShader, const std::string& fragmentShader) -{ - return -1; -} diff --git a/utils/gl_utils/src/mock/texture.cpp b/utils/gl_utils/src/mock/texture.cpp deleted file mode 100644 index 31ae14fc7d..0000000000 --- a/utils/gl_utils/src/mock/texture.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2021 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. - */ - -#include "texture.h" - -Texture::Texture(void *buffer, int32_t width, int32_t height) - : buffer_(buffer), width_(width), height_(height) -{ -} - -Texture::Texture(uint32_t texture) -{ -} - -Texture::~Texture() -{ -} - -void Texture::Bind(uint32_t slot) const -{ -} - -void Texture::Unbind() -{ -} diff --git a/utils/gl_utils/src/shader.cpp b/utils/gl_utils/src/shader.cpp deleted file mode 100644 index e2372d76fa..0000000000 --- a/utils/gl_utils/src/shader.cpp +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (c) 2021 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. - */ - -#include "shader.h" - -#include -#include -#include - -namespace { -DEFINE_HILOG_LABEL("Shader"); -} // namespace - -Shader::Shader(const std::string& vertexSource, const std::string& fragmentSource) -{ - rendererID_ = CreateShader(vertexSource, fragmentSource); -} - -Shader::~Shader() -{ - if (rendererID_ != 0) { - glDeleteProgram(rendererID_); - } -} - -bool Shader::Available() -{ - return rendererID_ != 0; -} - -void Shader::Bind() const -{ - glUseProgram(rendererID_); -} - -void Shader::Unbind() const -{ - glUseProgram(0); -} - -void Shader::SetUniform1i(const std::string& name, int32_t v) -{ - glUniform1i(GetUniformLocation(name), v); -} - -void Shader::SetUniform1f(const std::string& name, float v) -{ - glUniform1f(GetUniformLocation(name), v); -} - -void Shader::SetUniform4f(const std::string& name, float v0, float v1, float v2, float v3) -{ - glUniform4f(GetUniformLocation(name), v0, v1, v2, v3); -} - -void Shader::SetUniformMat4f(const std::string& name, const Matrix& matrix) -{ - glUniformMatrix4fv(GetUniformLocation(name), 1, GL_FALSE, matrix); -} - -int32_t Shader::GetAttribLocation(const std::string& name) -{ - return glGetAttribLocation(rendererID_, name.c_str()); -} - -int32_t Shader::GetUniformLocation(const std::string& name) -{ - if (uniformLocationCache_.find(name) != uniformLocationCache_.end()) { - return uniformLocationCache_[name]; - } - auto location = glGetUniformLocation(rendererID_, name.c_str()); - if (location == -1) { - GSLOG2HI(WARN) << "Warning: uniform '" << name << "' doesn't exist!" << std::endl; - } - - uniformLocationCache_[name] = location; - return location; -} - -uint32_t Shader::CompileShader(uint32_t type, const std::string& source) -{ - auto id = glCreateShader(type); - auto src = source.c_str(); - glShaderSource(id, 1, &src, nullptr); - glCompileShader(id); - - auto result = GL_FALSE; - glGetShaderiv(id, GL_COMPILE_STATUS, &result); - if (result == GL_FALSE) { - int32_t length = 0; - glGetShaderiv(id, GL_INFO_LOG_LENGTH, &length); - if (length < 0) { - GSLOG2HI(ERROR) << "CompileShader Failed length is not right"; - return 0; - } - char* message = static_cast(malloc(length)); - if (message == nullptr) { - GSLOG2HI(ERROR) << "CompileShader Failed malloc failed"; - return 0; - } - glGetShaderInfoLog(id, length, &length, message); - GSLOG2HI(ERROR) << "CompileShader[" << type << "] Failed: " << message; - glDeleteShader(id); - free(message); - message = nullptr; - return 0; - } - - return id; -} - -uint32_t Shader::CreateShader(const std::string& vertexShader, const std::string& fragmentShader) -{ - auto program = glCreateProgram(); - auto vs = CompileShader(GL_VERTEX_SHADER, vertexShader); - auto fs = CompileShader(GL_FRAGMENT_SHADER, fragmentShader); - - glAttachShader(program, vs); - glAttachShader(program, fs); - glLinkProgram(program); - glDeleteShader(vs); - glDeleteShader(fs); - - auto result = GL_FALSE; - glGetProgramiv(program, GL_LINK_STATUS, &result); - if (result == GL_FALSE) { - int32_t length = 0; - glGetProgramiv(program, GL_INFO_LOG_LENGTH, &length); - if (length < 0) { - GSLOG2HI(ERROR) << "CreateShader Failed length is not right"; - return 0; - } - char* message = static_cast(malloc(length)); - if (message == nullptr) { - GSLOG2HI(ERROR) << "CreateShader Failed malloc failed"; - return 0; - } - glGetProgramInfoLog(program, length, nullptr, message); - GSLOG2HI(ERROR) << "program error[" << glGetError() << "]: " << message; - free(message); - message = nullptr; - return 0; - } - - GSLOG2HI(INFO) << "Shader create success " << program; - return program; -} diff --git a/utils/gl_utils/src/texture.cpp b/utils/gl_utils/src/texture.cpp deleted file mode 100644 index c7468e4310..0000000000 --- a/utils/gl_utils/src/texture.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2021 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. - */ - -#include "texture.h" - -#include -#include - -#include - -#include - -Texture::Texture(void *buffer, int32_t width, int32_t height) - : buffer_(buffer), width_(width), height_(height) -{ - glGenTextures(1, &rendererID_); - glBindTexture(GL_TEXTURE_2D, rendererID_); - - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - - glTexImage2D(GL_TEXTURE_2D, 0, GL_BGRA_EXT, width_, height_, 0, GL_BGRA_EXT, GL_UNSIGNED_BYTE, buffer_); -} - -Texture::Texture(uint32_t texture) -{ - rendererID_ = texture; -} - -Texture::~Texture() -{ - glDeleteTextures(1, &rendererID_); -} - -void Texture::Bind(uint32_t slot) const -{ - glActiveTexture(GL_TEXTURE0 + slot); - glBindTexture(GL_TEXTURE_2D, rendererID_); -} - -void Texture::Unbind() -{ - glBindTexture(GL_TEXTURE_2D, 0); -} diff --git a/utils/gslogger/BUILD.gn b/utils/gslogger/BUILD.gn deleted file mode 100644 index 3890737c9e..0000000000 --- a/utils/gslogger/BUILD.gn +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) 2021 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. - -import("//build/ohos.gni") - -## Build libgslogger.a {{{ -config("libgslogger_config") { - visibility = [ ":*" ] - - cflags = [ - "-Wall", - "-Werror", - "-g3", - ] -} - -config("libgslogger_public_config") { - include_dirs = [ "export" ] -} - -ohos_static_library("libgslogger") { - sources = [ "src/gslogger.cpp" ] - - configs = [ ":libgslogger_config" ] - - public_configs = [ ":libgslogger_public_config" ] - - external_deps = [ "hilog:libhilog" ] - - part_name = "graphic_2d" - subsystem_name = "graphic" -} -## Build libgslogger.a }}} diff --git a/utils/gslogger/export/gslogger.h b/utils/gslogger/export/gslogger.h deleted file mode 100644 index 3c8c5fd2eb..0000000000 --- a/utils/gslogger/export/gslogger.h +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (c) 2021 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 UTILS_INCLUDE_LOGGER_EXPORT_GSLOGGER_H -#define UTILS_INCLUDE_LOGGER_EXPORT_GSLOGGER_H - -#include -#include -#include -#include - -class Gslogger : public std::stringstream { -public: - enum class LOG_LEVEL { DEBUG, INFO, WARN, ERROR, FATAL }; - enum class LOG_PHASE { BEGIN, END }; - - using GsloggerWrapperFunc = void(*)(Gslogger &, enum LOG_PHASE phase); - // output GsloggerWrapperFunc - static void Stdout(Gslogger &logger, enum LOG_PHASE phase); - static void Stderr(Gslogger &logger, enum LOG_PHASE phase); - static void Hilog(Gslogger &logger, enum LOG_PHASE phase); - static void FileLog(Gslogger &logger, enum LOG_PHASE phase); - - // wrapper GsloggerWrapperFunc - static void Func(Gslogger &logger, enum LOG_PHASE phase); // 1 - static void FuncLine(Gslogger &logger, enum LOG_PHASE phase); // 2 - static void FileLine(Gslogger &logger, enum LOG_PHASE phase); // 3 - static void FileFuncLine(Gslogger &logger, enum LOG_PHASE phase); // 4 - static void PidTid(Gslogger &logger, enum LOG_PHASE phase); // +5 - - Gslogger(const std::string &file, const std::string &func, int line, enum LOG_LEVEL level, ...); - virtual ~Gslogger() override; - - const std::string &GetFile() const; - const std::string &GetFunc() const; - int GetLine() const; - enum LOG_LEVEL GetLevel() const; - va_list &GetVariousArgument(); - - template - std::shared_ptr GetData() - { - using sptrT = std::shared_ptr; - sptrT ret = nullptr; - auto pRet = std::any_cast(&data_); - if (pRet != nullptr) { - ret = *pRet; - } else { - ret = std::make_shared(); - data_ = ret; - } - return ret; - } - -private: - std::string file_; - std::string func_; - int line_; - enum LOG_LEVEL level_; - va_list vl_; - std::any data_; - std::vector wrappers_; -}; - -#define LOGGER_ARG(level) __FILE__, __func__, __LINE__, (Gslogger::LOG_LEVEL::level) - -// hilog -#define DEFINE_HILOG_LABEL(str) \ - namespace { constexpr const char *HILOG_LABEL = str; } -#define GSLOG0HI(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::Hilog, HILOG_LABEL, NULL) -#define GSLOG1HI(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::Func, Gslogger::Hilog, HILOG_LABEL, NULL) -#define GSLOG2HI(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::FuncLine, Gslogger::Hilog, HILOG_LABEL, NULL) -#define GSLOG3HI(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::FileLine, Gslogger::Hilog, HILOG_LABEL, NULL) -#define GSLOG4HI(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::FileFuncLine, Gslogger::Hilog, HILOG_LABEL, NULL) - -// stdout -#define GSLOG0SO(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::Stdout, NULL) -#define GSLOG1SO(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::Func, Gslogger::Stdout, NULL) -#define GSLOG2SO(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::FuncLine, Gslogger::Stdout, NULL) -#define GSLOG3SO(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::FileLine, Gslogger::Stdout, NULL) -#define GSLOG4SO(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::FileFuncLine, Gslogger::Stdout, NULL) -#define GSLOG5SO(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::PidTid, Gslogger::Stdout, NULL) -#define GSLOG6SO(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::PidTid, Gslogger::Func, Gslogger::Stdout, NULL) -#define GSLOG7SO(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::PidTid, Gslogger::FuncLine, Gslogger::Stdout, NULL) -#define GSLOG8SO(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::PidTid, Gslogger::FileLine, Gslogger::Stdout, NULL) -#define GSLOG9SO(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::PidTid, Gslogger::FileFuncLine, Gslogger::Stdout, NULL) - -// stderr -#define GSLOG0SE(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::Stderr, NULL) -#define GSLOG1SE(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::Func, Gslogger::Stderr, NULL) -#define GSLOG2SE(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::FuncLine, Gslogger::Stderr, NULL) -#define GSLOG3SE(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::FileLine, Gslogger::Stderr, NULL) -#define GSLOG4SE(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::FileFuncLine, Gslogger::Stderr, NULL) -#define GSLOG5SE(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::PidTid, Gslogger::Stderr, NULL) -#define GSLOG6SE(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::PidTid, Gslogger::Func, Gslogger::Stderr, NULL) -#define GSLOG7SE(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::PidTid, Gslogger::FuncLine, Gslogger::Stderr, NULL) -#define GSLOG8SE(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::PidTid, Gslogger::FileLine, Gslogger::Stderr, NULL) -#define GSLOG9SE(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::PidTid, Gslogger::FileFuncLine, Gslogger::Stderr, NULL) - -// filelog -#define DEFINE_FILE_LABEL(str) \ - namespace { constexpr const char *FILE_LABEL = str; } -#define GSLOG0F(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::FileLog, FILE_LABEL, NULL) -#define GSLOG1F(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::Func, Gslogger::FileLog, FILE_LABEL, NULL) -#define GSLOG2F(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::FuncLine, Gslogger::FileLog, FILE_LABEL, NULL) -#define GSLOG3F(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::FileLine, Gslogger::FileLog, FILE_LABEL, NULL) -#define GSLOG4F(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::FileFuncLine, Gslogger::FileLog, FILE_LABEL, NULL) -#define GSLOG5F(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::PidTid, Gslogger::FileLog, FILE_LABEL, NULL) -#define GSLOG6F(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::PidTid, Gslogger::Func, Gslogger::FileLog, FILE_LABEL, NULL) -#define GSLOG7F(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::PidTid, Gslogger::FuncLine, Gslogger::FileLog, FILE_LABEL, NULL) -#define GSLOG8F(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::PidTid, Gslogger::FileLine, Gslogger::FileLog, FILE_LABEL, NULL) -#define GSLOG9F(level) Gslogger(LOGGER_ARG(level), \ - Gslogger::PidTid, Gslogger::FileFuncLine, Gslogger::FileLog, FILE_LABEL, NULL) - -#endif // UTILS_INCLUDE_LOGGER_EXPORT_GSLOGGER_H diff --git a/utils/gslogger/src/gslogger.cpp b/utils/gslogger/src/gslogger.cpp deleted file mode 100644 index 9e7d044f55..0000000000 --- a/utils/gslogger/src/gslogger.cpp +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Copyright (c) 2021 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. - */ - -#include "gslogger.h" - -#include -#include -#include - -#include - -namespace { -const char *GetLevelStr(enum Gslogger::LOG_LEVEL level) -{ - switch (level) { - case Gslogger::LOG_LEVEL::DEBUG: return "D"; - case Gslogger::LOG_LEVEL::INFO: return "I"; - case Gslogger::LOG_LEVEL::WARN: return "W"; - case Gslogger::LOG_LEVEL::ERROR: return "E"; - case Gslogger::LOG_LEVEL::FATAL: return "F"; - } - return "?"; -} -} // namespace - -void Gslogger::Stdout(Gslogger& logger, enum LOG_PHASE phase) -{ - if (phase == LOG_PHASE::BEGIN) { - return; - } - - // LOG_PHASE::END - std::cout << "[" << GetLevelStr(logger.GetLevel()) << "] " << logger.str() << std::endl; -} - -void Gslogger::Stderr(Gslogger& logger, enum LOG_PHASE phase) -{ - if (phase == LOG_PHASE::BEGIN) { - return; - } - - // LOG_PHASE::END - std::cerr << "[" << GetLevelStr(logger.GetLevel()) << "] " << logger.str() << std::endl; -} - -void Gslogger::Hilog(Gslogger& logger, enum LOG_PHASE phase) -{ - struct HilogData { - OHOS::HiviewDFX::HiLogLabel hiLogLabel; - }; - auto data = logger.GetData(); - if (phase == LOG_PHASE::BEGIN) { - auto label = va_arg(logger.GetVariousArgument(), const char *); - data->hiLogLabel = { LOG_CORE, 0, label }; - return; - } - - // LOG_PHASE::END - auto fn = OHOS::HiviewDFX::HiLog::Debug; - switch (logger.GetLevel()) { - case LOG_LEVEL::DEBUG: - fn = OHOS::HiviewDFX::HiLog::Debug; - break; - case LOG_LEVEL::INFO: - fn = OHOS::HiviewDFX::HiLog::Info; - break; - case LOG_LEVEL::WARN: - fn = OHOS::HiviewDFX::HiLog::Warn; - break; - case LOG_LEVEL::ERROR: - fn = OHOS::HiviewDFX::HiLog::Error; - break; - case LOG_LEVEL::FATAL: - fn = OHOS::HiviewDFX::HiLog::Fatal; - break; - } - fn(data->hiLogLabel, "%{public}s", logger.str().c_str()); -} - -void Gslogger::FileLog(Gslogger& logger, enum LOG_PHASE phase) -{ - struct FileLogData { - const char *filename; - }; - auto data = logger.GetData(); - if (phase == LOG_PHASE::BEGIN) { - auto filename = va_arg(logger.GetVariousArgument(), const char *); - data->filename = filename; - return; - } - - char path[PATH_MAX + 1] = { 0x00 }; - if (strlen(data->filename) > PATH_MAX || realpath(data->filename, path) == NULL) { - std::cerr << "File path error!" << std::endl; - return; - } - - // LOG_PHASE::END - std::ofstream ofs(path, std::ofstream::out | std::ofstream::app); - if (!ofs) { - // open failed, errno - return; - } - - if (ofs) { - ofs << "[" << GetLevelStr(logger.GetLevel()) << "] " << logger.str() << std::endl; - } -} - -void Gslogger::Func(Gslogger& logger, enum LOG_PHASE phase) -{ - if (phase == LOG_PHASE::BEGIN) { - logger << "[" << logger.GetFunc() << "] "; - } -} - -void Gslogger::FuncLine(Gslogger& logger, enum LOG_PHASE phase) -{ - if (phase == LOG_PHASE::BEGIN) { - logger << "[" << logger.GetFunc() << ":" << logger.GetLine() << "] "; - } -} - -void Gslogger::FileLine(Gslogger& logger, enum LOG_PHASE phase) -{ - if (phase == LOG_PHASE::BEGIN) { - logger << "[" << logger.GetFile() << " +" << logger.GetLine() << "] "; - } -} - -void Gslogger::FileFuncLine(Gslogger& logger, enum LOG_PHASE phase) -{ - if (phase == LOG_PHASE::BEGIN) { - logger << "[" << logger.GetFile() << " +" << logger.GetLine() << ":" << logger.GetFunc() << "] "; - } -} - -void Gslogger::PidTid(Gslogger &logger, enum LOG_PHASE phase) -{ - if (phase == LOG_PHASE::BEGIN) { - logger << "[" << getpid() << "][" << gettid() << "]"; - } -} - -Gslogger::Gslogger(const std::string &file, const std::string &func, int line, enum LOG_LEVEL level, ...) -{ - file_ = file; - func_ = func; - line_ = line; - level_ = level; - va_start(vl_, level); - - while (true) { - GsloggerWrapperFunc f = va_arg(vl_, GsloggerWrapperFunc); - if (f == nullptr) { - break; - } - - f(*this, LOG_PHASE::BEGIN); - wrappers_.push_back(f); - } -} - -Gslogger::~Gslogger() -{ - for (const auto &wrapper : wrappers_) { - wrapper(*this, LOG_PHASE::END); - } -} - -const std::string &Gslogger::GetFile() const -{ - return file_; -} - -const std::string &Gslogger::GetFunc() const -{ - return func_; -} - -int Gslogger::GetLine() const -{ - return line_; -} - -enum Gslogger::LOG_LEVEL Gslogger::GetLevel() const -{ - return level_; -} - -va_list &Gslogger::GetVariousArgument() -{ - return vl_; -} diff --git a/utils/lex_yacc/gen_flexlexer_header.py b/utils/lex_yacc/gen_flexlexer_header.py deleted file mode 100755 index cde71464bf..0000000000 --- a/utils/lex_yacc/gen_flexlexer_header.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -# Copyright (c) 2021 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. - -import optparse -import subprocess -import sys - - -def parse_args(args): - parser = optparse.OptionParser() - parser.add_option("--output") - opts, _ = parser.parse_args(args) - return opts - -if __name__ == '__main__': - options = parse_args(sys.argv[1:]) - parse_scripts = subprocess.check_call( - ["cp", "-f", "/usr/include/FlexLexer.h", options.output]) diff --git a/utils/lex_yacc/gen_lex_cpp.py b/utils/lex_yacc/gen_lex_cpp.py deleted file mode 100755 index ba6635a94c..0000000000 --- a/utils/lex_yacc/gen_lex_cpp.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -# Copyright (c) 2021 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. - -import optparse -import subprocess -import sys - - -def parse_args(args): - parser = optparse.OptionParser() - parser.add_option("--input") - parser.add_option("--output") - opts, _ = parser.parse_args(args) - return opts - -if __name__ == '__main__': - options = parse_args(sys.argv[1:]) - parse_scripts = subprocess.check_call( - ["flex", "--c++", "-o", options.output, options.input]) diff --git a/utils/lex_yacc/gen_yacc_cpp.py b/utils/lex_yacc/gen_yacc_cpp.py deleted file mode 100755 index 3dfb6531ec..0000000000 --- a/utils/lex_yacc/gen_yacc_cpp.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -# Copyright (c) 2021 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. - -import optparse -import subprocess -import sys - - -def parse_args(args): - parser = optparse.OptionParser() - parser.add_option("--input") - parser.add_option("--output") - opts, _ = parser.parse_args(args) - return opts - -if __name__ == '__main__': - options = parse_args(sys.argv[1:]) - parse_scripts = subprocess.check_call( - ["bison", "-Wnone", "-o", options.output, options.input]) diff --git a/utils/lex_yacc/lex_yacc.gni b/utils/lex_yacc/lex_yacc.gni deleted file mode 100644 index b85adff785..0000000000 --- a/utils/lex_yacc/lex_yacc.gni +++ /dev/null @@ -1,130 +0,0 @@ -# Copyright (c) 2021 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. - -import("//build/ohos.gni") - -gni_filepath = "//foundation/graphic/graphic_2d/utils/lex_yacc" - -template("lex_yacc") { - lex_name = invoker.lex - yacc_name = invoker.yacc - gen_flexlexer_name = "${target_name}_gen_flexlexer" - gen_lex_name = "${target_name}_gen_lex" - gen_yacc_name = "${target_name}_gen_yacc" - gen_lex_yacc_name = "${target_name}_gen_lex_yacc" - gen_config_name = "${target_name}_gen_config" - - flexlexer_filename = "$root_gen_dir/$target_name/FlexLexer.h" - flexlexer_pathname = rebase_path(flexlexer_filename, root_build_dir) - action(gen_flexlexer_name) { - script = "$gni_filepath/gen_flexlexer_header.py" - inputs = [ script ] - outputs = [ flexlexer_filename ] - args = [ - "--output", - flexlexer_pathname, - ] - } - - lex_filename = "$root_gen_dir/$target_name/lexer.yy.cc" - lex_pathname = rebase_path(lex_filename, root_build_dir) - action(gen_lex_name) { - script = "$gni_filepath/gen_lex_cpp.py" - lex_inputfile = rebase_path(lex_name, root_build_dir) - - inputs = [ - script, - lex_name, - ] - outputs = [ lex_filename ] - args = [ - "--input", - lex_inputfile, - "--output", - lex_pathname, - ] - } - - yacc_filename = "$root_gen_dir/$target_name/parser.cpp" - yacc_pathname = rebase_path(yacc_filename, root_build_dir) - action(gen_yacc_name) { - script = "$gni_filepath/gen_yacc_cpp.py" - yacc_inputfile = rebase_path(yacc_name, root_build_dir) - - inputs = [ - script, - yacc_name, - ] - outputs = [ yacc_filename ] - args = [ - "--input", - yacc_inputfile, - "--output", - yacc_pathname, - ] - } - - config(gen_config_name) { - include_dirs = [ - ".", - "$root_gen_dir/$target_name", - ] - cflags = [ - "-Wno-unused-private-field", - "-Wno-header-hygiene", - "-Wno-implicit-fallthrough", - ] - } - - ohos_static_library(gen_lex_yacc_name) { - sources = [ - "$lex_filename", - "$yacc_filename", - ] - - forward_variables_from(invoker, - [ - "cflags", - "include_dirs", - "public_configs", - "deps", - "public_deps", - ]) - - if (!defined(configs)) { - configs = [] - } - if (defined(invoker.configs)) { - configs += invoker.configs - } - - if (!defined(public_configs)) { - public_configs = [] - } - public_configs += [ - ":$gen_config_name", - "//build/config/compiler:rtti", - "//build/config/compiler:exceptions", - ] - - deps = [ - ":${gen_flexlexer_name}", - ":${gen_lex_name}", - ":${gen_yacc_name}", - ] - } - - group(target_name) { - public_deps = [ ":${gen_lex_yacc_name}" ] - } -} diff --git a/utils/matrix/BUILD.gn b/utils/matrix/BUILD.gn deleted file mode 100644 index 399bf32dfd..0000000000 --- a/utils/matrix/BUILD.gn +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2021 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. - -import("//build/ohos.gni") - -config("matrix_public_config") { - include_dirs = [ "export" ] -} - -group("matrix") { - public_configs = [ ":matrix_public_config" ] -} diff --git a/utils/matrix/export/matrix.h b/utils/matrix/export/matrix.h deleted file mode 100644 index 95054f2743..0000000000 --- a/utils/matrix/export/matrix.h +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (c) 2021 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 UTILS_MATRIX_EXPORT_MATRIX_H -#define UTILS_MATRIX_EXPORT_MATRIX_H - -#include -#include -#include - -template -class Matrix { -public: - static inline constexpr int32_t rowcol = 4; - static inline constexpr int32_t units = rowcol * rowcol; - - static Matrix UnitMatrix() - { - Matrix retval; - for (int32_t i = 0; i < units; i++) { - retval.ptr[i] = 0; - } - retval.ele(0x0, 0x0) = 0x1; - retval.ele(0x1, 0x1) = 0x1; - retval.ele(0x2, 0x2) = 0x1; - retval.ele(0x3, 0x3) = 0x1; - return retval; - } - - static Matrix TranslateMatrix(T x, T y, T z = 0) - { - Matrix retval = UnitMatrix(); - retval.ele(0x0, 0x3) = x; - retval.ele(0x1, 0x3) = y; - retval.ele(0x2, 0x3) = z; - return retval; - } - - static Matrix ScaleMatrix(T x, T y, T z = 1) - { - Matrix retval = UnitMatrix(); - retval.ele(0x0, 0x0) *= x; - retval.ele(0x1, 0x1) *= y; - retval.ele(0x2, 0x2) *= z; - return retval; - } - - static Matrix RotateMatrixZ(double angle) - { - Matrix retval = UnitMatrix(); - double rad = angle * acos(-1) / 180.0; - retval.ele(0x0, 0x0) = cos(rad); - retval.ele(0x0, 0x1) = -sin(rad); - retval.ele(0x1, 0x0) = sin(rad); - retval.ele(0x1, 0x1) = cos(rad); - return retval; - } - - Matrix() = default; - - Matrix(const Matrix &m) - { - for (int32_t i = 0; i < units; i++) { - ptr[i] = m.ptr[i]; - } - } - - Matrix(Matrix &&m) - { - ptr = std::move(m.ptr); - } - - Matrix &operator =(const Matrix &m) - { - for (int32_t i = 0; i < units; i++) { - ptr[i] = m.ptr[i]; - } - return *this; - } - - Matrix operator *(const Matrix other) - { - Matrix retval; - for (int i = 0; i < rowcol; i++) { - for (int j = 0; j < rowcol; j++) { - retval.ele(i, j) = 0; - for (int k = 0; k < rowcol; k++) { - retval.ele(i, j) += ele(i, k) * other.ele(k, j); - } - } - } - return retval; - } - - operator T*() const - { - return ptr.get(); - } - - friend std::ostream &operator <<(std::ostream &os, const Matrix &m) - { - os << std::endl; - os << "Matrix {" << std::endl; - os << " [" << m.ele(0x0, 0x0) << "] [" - << m.ele(0x0, 0x1) << "] [" - << m.ele(0x0, 0x2) << "] [" - << m.ele(0x0, 0x3) << "]" - << std::endl; - os << " [" << m.ele(0x1, 0x0) << "] [" - << m.ele(0x1, 0x1) << "] [" - << m.ele(0x1, 0x2) << "] [" - << m.ele(0x1, 0x3) << "]" - << std::endl; - os << " [" << m.ele(0x2, 0x0) << "] [" - << m.ele(0x2, 0x1) << "] [" - << m.ele(0x2, 0x2) << "] [" - << m.ele(0x2, 0x3) << "]" - << std::endl; - os << " [" << m.ele(0x3, 0x0) << "] [" - << m.ele(0x3, 0x1) << "] [" - << m.ele(0x3, 0x2) << "] [" - << m.ele(0x3, 0x3) << "]" - << std::endl; - os << "}" << std::endl; - return os; - } - -private: - inline T &ele(int i, int j) const - { - return ptr[i + j * rowcol]; - } - - std::unique_ptr ptr = std::make_unique(units); -}; - -#endif // UTILS_MATRIX_EXPORT_MATRIX_H diff --git a/utils/option_parser/BUILD.gn b/utils/option_parser/BUILD.gn deleted file mode 100644 index a4129bdd7d..0000000000 --- a/utils/option_parser/BUILD.gn +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) 2021 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. - -import("//build/ohos.gni") - -## Build option_parser.a {{{ -config("option_parser_config") { - visibility = [ ":*" ] - - cflags = [ - "-Wall", - "-Werror", - "-g3", - ] -} - -config("option_parser_public_config") { - include_dirs = [ "export" ] -} - -ohos_static_library("option_parser") { - sources = [ "src/option_parser.cpp" ] - - configs = [ ":option_parser_config" ] - - public_configs = [ ":option_parser_public_config" ] - - subsystem_name = "graphic" - part_name = "graphic_2d" -} -## Build option_parser.a }}} diff --git a/utils/option_parser/export/option_parser.h b/utils/option_parser/export/option_parser.h deleted file mode 100644 index 63d095a7cb..0000000000 --- a/utils/option_parser/export/option_parser.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (c) 2021 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 UTILS_OPTION_PARSER_EXPORT_OPTION_PARSER_H -#define UTILS_OPTION_PARSER_EXPORT_OPTION_PARSER_H - -#include -#include -#include - -class OptionParser { -public: - int32_t Parse(int32_t argc, const char **argv); - std::string GetErrorString(); - - template - int32_t AddOption(const std::string &shortOpt, const std::string &longOpt, T &result) - { - return 0; - } - - template<> - int32_t AddOption(const std::string &shortOpt, const std::string &longOpt, int32_t &result) - { - return AddOption(shortOpt, longOpt, &result, Option::ValueType::i32); - } - - template<> - int32_t AddOption(const std::string &shortOpt, const std::string &longOpt, uint32_t &result) - { - return AddOption(shortOpt, longOpt, &result, Option::ValueType::u32); - } - - template<> - int32_t AddOption(const std::string &shortOpt, const std::string &longOpt, int64_t &result) - { - return AddOption(shortOpt, longOpt, &result, Option::ValueType::i64); - } - - template<> - int32_t AddOption(const std::string &shortOpt, const std::string &longOpt, double &result) - { - return AddOption(shortOpt, longOpt, &result, Option::ValueType::f64); - } - - template<> - int32_t AddOption(const std::string &shortOpt, const std::string &longOpt, std::string &result) - { - return AddOption(shortOpt, longOpt, &result, Option::ValueType::str); - } - - template<> - int32_t AddOption(const std::string &shortOpt, const std::string &longOpt, bool &result) - { - return AddOption(shortOpt, longOpt, &result, Option::ValueType::bol); - } - - template - int32_t AddArguments(T &result) - { - return 0; - } - - template<> - int32_t AddArguments(int32_t &result) - { - return AddArguments(&result, Argument::ValueType::i32); - } - - template<> - int32_t AddArguments(uint32_t &result) - { - return AddArguments(&result, Argument::ValueType::u32); - } - - template<> - int32_t AddArguments(int64_t &result) - { - return AddArguments(&result, Argument::ValueType::i64); - } - - template<> - int32_t AddArguments(double &result) - { - return AddArguments(&result, Argument::ValueType::f64); - } - - template<> - int32_t AddArguments(std::string &result) - { - return AddArguments(&result, Argument::ValueType::str); - } - - int32_t GetSkippedArgc(); - const char **GetSkippedArgv(); - -private: - int32_t ParseArgument(const char *arg, const char *arg2); - int32_t ParseArgc(const char *arg, const char *arg2); - int32_t ParseShortOption(const char *arg1, const char *arg2); - int32_t ParseLongEqualOption(const char *arg, const char *arg2); - int32_t ParseLongOption(const char *arg1, const char *arg2); - int32_t AddSkipped(const char *arg, const char *arg2); - - struct Option { - const std::string so; - const std::string lo; - union Value { - int32_t i32; - uint32_t u32; - int64_t i64; - double f64; - std::string str; - bool bl; - } *result; - enum class ValueType { - i32, - u32, - i64, - f64, - str, - bol, - } type; - }; - - int32_t AddOption(const std::string &shortOpt, - const std::string &longOpt, void *result, Option::ValueType type); - - struct Argument { - union Value { - int32_t i32; - uint32_t u32; - int64_t i64; - double f64; - std::string str; - } *result; - enum class ValueType { - i32, - u32, - i64, - f64, - str, - } type; - }; - - int32_t AddArguments(void *result, Argument::ValueType type); - - std::list arguments; - std::vector options; - std::vector skipped; - std::string error = ""; -}; - -#endif // UTILS_OPTION_PARSER_EXPORT_OPTION_PARSER_H diff --git a/utils/option_parser/src/option_parser.cpp b/utils/option_parser/src/option_parser.cpp deleted file mode 100644 index 2b4dd434a2..0000000000 --- a/utils/option_parser/src/option_parser.cpp +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Copyright (c) 2021 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. - */ - -#include - -#include -#include - -enum { - PARSER_NEXT = 0, - PARSER_ERROR = 1, - PARSER_PARSED = 2, - PARSER_PARSED_MORE = 3, -}; - -int32_t OptionParser::ParseArgument(const char *arg, const char *arg2) -{ - if (arguments.empty()) { - return PARSER_NEXT; - } - - std::stringstream ss(arg); - switch (arguments.front().type) { - case Argument::ValueType::i32: - ss >> std::setbase(0) >> arguments.front().result->i32; - break; - case Argument::ValueType::u32: - ss >> std::setbase(0) >> arguments.front().result->u32; - break; - case Argument::ValueType::i64: - ss >> std::setbase(0) >> arguments.front().result->i64; - break; - case Argument::ValueType::f64: - ss >> arguments.front().result->f64; - break; - case Argument::ValueType::str: - ss >> arguments.front().result->str; - break; - } - - if (!ss.eof() || !ss) { - error = "parse "; - error = error + arg + " error"; - return PARSER_ERROR; - } - - arguments.pop_front(); - return PARSER_PARSED; -} - -int32_t OptionParser::ParseArgc(const char *arg, const char *arg2) -{ - if (arg[0] == 0) { - return PARSER_ERROR; - } - - if (arg[0] != '-') { - skipped.push_back(arg); - return PARSER_PARSED; - } - - if (arg[1] == 0) { - return PARSER_ERROR; - } - return PARSER_NEXT; -} - -int32_t OptionParser::ParseShortOption(const char *arg1, const char *arg2) -{ - if (arg1[1] == '-') { - // long option - return PARSER_NEXT; - } - - for (const auto &option : options) { - if (option.so == &arg1[1]) { - if (option.type == Option::ValueType::bol) { - option.result->bl = !option.result->bl; - return PARSER_PARSED; - } else if (arg2 == nullptr) { - error = option.so + " need argument"; - return PARSER_ERROR; - } - - std::stringstream ss(arg2); - switch (option.type) { - case Option::ValueType::i32: - ss >> std::setbase(0) >> option.result->i32; - break; - case Option::ValueType::u32: - ss >> std::setbase(0) >> option.result->u32; - break; - case Option::ValueType::i64: - ss >> std::setbase(0) >> option.result->i64; - break; - case Option::ValueType::f64: - ss >> option.result->f64; - break; - case Option::ValueType::str: - ss >> option.result->str; - break; - default: - break; - } - - if (!ss.eof() || !ss) { - error = "parse "; - error = error + arg1 + " error, " + arg2; - return PARSER_ERROR; - } - - return PARSER_PARSED_MORE; - } - } - return PARSER_NEXT; -} - -int32_t OptionParser::ParseLongEqualOption(const char *arg, const char *arg2) -{ - if (arg[1] != '-') { - return PARSER_NEXT; - } - - int32_t ret = 0; - bool parsed = false; - for (const char *c = arg; *c; c++) { - if (*c == '=') { - std::string arg1(arg, c - arg); - std::string arg2(c + 1); - ret = ParseLongOption(arg1.c_str(), arg2.c_str()); - parsed = true; - break; - } - } - - if (ret == PARSER_ERROR || ret == PARSER_NEXT) { - return ret; - } - - if (parsed) { - return PARSER_PARSED; - } - return PARSER_NEXT; -} - -int32_t OptionParser::ParseLongOption(const char *arg1, const char *arg2) -{ - if (arg1[1] != '-') { - return PARSER_NEXT; - } - - for (const auto &option : options) { - if (option.lo == &arg1[0x2]) { - if (option.type == Option::ValueType::bol) { - option.result->bl = !option.result->bl; - return PARSER_PARSED; - } else if (arg2 == nullptr) { - error = option.lo + " need argument"; - return PARSER_ERROR; - } - - std::stringstream ss(arg2); - switch (option.type) { - case Option::ValueType::i32: - ss >> std::setbase(0) >> option.result->i32; - break; - case Option::ValueType::u32: - ss >> std::setbase(0) >> option.result->u32; - break; - case Option::ValueType::i64: - ss >> std::setbase(0) >> option.result->i64; - break; - case Option::ValueType::f64: - ss >> option.result->f64; - break; - case Option::ValueType::str: - ss >> option.result->str; - break; - default: - break; - } - - if (!ss.eof() || !ss) { - error = "parse "; - error = error + arg1 + " error, " + arg2; - return PARSER_ERROR; - } - return PARSER_PARSED_MORE; - } - } - return PARSER_NEXT; -} - -int32_t OptionParser::AddSkipped(const char *arg, const char *arg2) -{ - skipped.push_back(arg); - return PARSER_PARSED; -} - -int32_t OptionParser::Parse(int32_t argc, const char **argv) -{ - int32_t (OptionParser:: *parsers[])(const char *, const char *) = { - &OptionParser::ParseArgument, - &OptionParser::ParseArgc, - &OptionParser::ParseShortOption, - &OptionParser::ParseLongEqualOption, - &OptionParser::ParseLongOption, - &OptionParser::AddSkipped, - }; - for (int32_t i = 0; i < argc; i++) { - for (auto &parser : parsers) { - auto ret = (this->*parser)(argv[i], argv[i + 1]); - if (ret == PARSER_ERROR) { - return ret; - } else if (ret == PARSER_PARSED_MORE) { - i++; - break; - } else if (ret == PARSER_PARSED) { - break; - } - } - } - - if (!arguments.empty()) { - error = "need more arguments"; - return 1; - } else { - skipped.push_back(nullptr); - } - - return 0; -} - -int32_t OptionParser::AddOption(const std::string &shortOpt, - const std::string &longOpt, void *result, Option::ValueType type) -{ - struct Option option = { - .so = shortOpt, - .lo = longOpt, - .result = reinterpret_cast(result), - .type = type, - }; - options.emplace_back(std::move(option)); - return 0; -} - -int32_t OptionParser::AddArguments(void *result, Argument::ValueType type) -{ - struct Argument argument = { - .result = reinterpret_cast(result), - .type = type, - }; - arguments.emplace_back(std::move(argument)); - return 0; -} - -std::string OptionParser::GetErrorString() -{ - return error; -} - -int32_t OptionParser::GetSkippedArgc() -{ - return skipped.size() - 1; -} - -const char **OptionParser::GetSkippedArgv() -{ - return skipped.data(); -} diff --git a/utils/promise/BUILD.gn b/utils/promise/BUILD.gn deleted file mode 100644 index 05912cfd7e..0000000000 --- a/utils/promise/BUILD.gn +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2021 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. - -import("//build/ohos.gni") - -config("promise_public_config") { - include_dirs = [ "export" ] -} - -group("promise") { - public_configs = [ ":promise_public_config" ] -} diff --git a/utils/promise/export/promise.h b/utils/promise/export/promise.h deleted file mode 100644 index cf970b1ee0..0000000000 --- a/utils/promise/export/promise.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2021 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 UTILS_INCLUDE_PROMISE_H -#define UTILS_INCLUDE_PROMISE_H - -#include -#include - -#include - -namespace OHOS { -template -class Promise : public RefBase { -public: - Promise() = default; - Promise(const T& t); - virtual ~Promise() = default; - - virtual bool IsResolved() const; - virtual const T &Await(); - virtual void Then(std::function func); - virtual bool Resolve(const T &t); - -private: - bool resolved = false; - std::mutex mutex; - std::condition_variable cv; - T value{}; - - std::function onComplete = nullptr; -}; - -template -Promise::Promise(const T& t) -{ - value = t; - resolved = true; -} - -template -bool Promise::IsResolved() const -{ - return resolved; -} - -template -const T &Promise::Await() -{ - if (resolved == false) { - std::unique_lock lock(mutex); - cv.wait(lock, [this]() { return resolved == true; }); - } - return value; -} - -template -void Promise::Then(std::function func) -{ - std::unique_lock lock(mutex); - if (resolved == false) { - onComplete = func; - } else { - func(value); - } -} - -template -bool Promise::Resolve(const T &t) -{ - if (resolved == false) { - std::unique_lock lock(mutex); - if (resolved == false) { - value = t; - resolved = true; - cv.notify_all(); - if (onComplete != nullptr) { - onComplete(value); - } - return true; - } - } - return false; -} -} // namespace OHOS - -#endif // UTILS_INCLUDE_PROMISE_H diff --git a/utils/raw_maker/BUILD.gn b/utils/raw_maker/BUILD.gn deleted file mode 100644 index d1bc7b3c05..0000000000 --- a/utils/raw_maker/BUILD.gn +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) 2021 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. - -import("//build/ohos.gni") - -## Build raw_maker.a {{{ -config("raw_maker_config") { - visibility = [ ":*" ] - - cflags = [ - "-Wall", - "-Werror", - "-g3", - ] -} - -config("raw_maker_public_config") { - include_dirs = [ - "export", - "../raw_parser/export", - ] -} - -ohos_static_library("raw_maker") { - sources = [ "src/raw_maker.cpp" ] - - configs = [ ":raw_maker_config" ] - - public_configs = [ ":raw_maker_public_config" ] - - deps = [ "..:libgslogger" ] - - subsystem_name = "graphic" - part_name = "graphic_2d" - external_deps = [ - "c_utils:utils", - "zlib:libz", - ] -} -## Build raw_maker.a }}} diff --git a/utils/raw_maker/export/raw_maker.h b/utils/raw_maker/export/raw_maker.h deleted file mode 100644 index 9b461b37db..0000000000 --- a/utils/raw_maker/export/raw_maker.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2021 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 FRAMEWORKS_BOOTANIMATION_INCLUDE_RAW_MAKER_H -#define FRAMEWORKS_BOOTANIMATION_INCLUDE_RAW_MAKER_H - -#include - -#include -#include -#include - -namespace OHOS { -class RawMaker { -public: - void SetFilename(const std::string &filename); - void SetWidth(uint32_t width); - void SetHeight(uint32_t height); - void SetHeaderType(RawHeaderType type); - int32_t WriteNextData(const uint8_t *addr); - -private: - int32_t DoFirstFrame(); - int32_t PrepareInNone(); - int32_t PrepareInRaw(const uint8_t *addr); - int32_t PrepareInCompress(const uint8_t *addr); - int32_t UpdateLastFrame(const uint8_t *addr); - int32_t WriteData(); - void WriteInt32(int32_t integer); - void CompareWithLastFrame(const uint8_t *addr); - - std::string filename = ""; - uint32_t width = 0; - uint32_t height = 0; - int32_t size = 0; - RawHeaderType type = RAW_HEADER_TYPE_NONE; - bool firstFrame = true; - std::ofstream ofs; - std::unique_ptr lastFrame; - std::unique_ptr compressed; - - struct { - RawHeaderType type; - int32_t offset; - int32_t length; - int32_t compressedLength; - const uint8_t *data; - } writing; -}; -} // namespace OHOS - -#endif // FRAMEWORKS_BOOTANIMATION_INCLUDE_RAW_MAKER_H diff --git a/utils/raw_maker/src/raw_maker.cpp b/utils/raw_maker/src/raw_maker.cpp deleted file mode 100644 index aef0a62a2e..0000000000 --- a/utils/raw_maker/src/raw_maker.cpp +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright (c) 2021 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. - */ - -#include "raw_maker.h" - -#include -#include - -#include -#include -#include - -namespace OHOS { -namespace { -DEFINE_HILOG_LABEL("RawMaker"); -} // namespace - -void RawMaker::SetFilename(const std::string &filename) -{ - if (firstFrame) { - this->filename = filename; - } - if (this->filename != filename) { - GSLOG2HI(ERROR) << "RawMaker::SetFilename now filename is different to first frame filename"; - } -} - -void RawMaker::SetWidth(uint32_t width) -{ - if (firstFrame) { - this->width = width; - } - if (this->width != width) { - GSLOG2HI(ERROR) << "RawMaker::SetWidth now width is different to first frame width"; - } - size = static_cast(width * height * 0x4); -} - -void RawMaker::SetHeight(uint32_t height) -{ - if (firstFrame) { - this->height = height; - } - if (this->height != height) { - GSLOG2HI(ERROR) << "RawMaker::SetHeight now height is different to first frame height"; - } - size = static_cast(width * height * 0x4); -} - -void RawMaker::SetHeaderType(RawHeaderType type) -{ - this->type = type; - if (type != RAW_HEADER_TYPE_NONE) { - GSLOG2HI(ERROR) << "RawMaker::SetHeaderType now type is not RAW_HEADER_TYPE_NONE"; - } -} - -int32_t RawMaker::WriteNextData(const uint8_t *addr) -{ - int32_t ret = 0; - if (firstFrame) { - ret = DoFirstFrame(); - writing.offset = 0; - writing.length = size; - } else { - CompareWithLastFrame(addr); - } - - ofs.open(filename, std::ofstream::app | std::ofstream::binary | std::ofstream::out); - if (errno) { - GSLOG2HI(ERROR) << "open " << filename << ", because " << strerror(errno); - return errno; - } - - if (writing.length == 0) { - ret = PrepareInNone(); - } else if (type == RAW_HEADER_TYPE_RAW) { - ret = PrepareInRaw(addr); - } else if (type == RAW_HEADER_TYPE_COMPRESSED) { - ret = PrepareInCompress(addr); - } - - if (ret) { - GSLOG2SO(ERROR) << "failed at prepare"; - ofs.close(); - return ret; - } - - WriteData(); - ofs.close(); - return 0; -} - -int32_t RawMaker::PrepareInNone() -{ - writing.type = RAW_HEADER_TYPE_NONE; - writing.offset = 0; - writing.length = 0; - writing.compressedLength = 0; - writing.data = nullptr; - return 0; -} - -int32_t RawMaker::PrepareInRaw(const uint8_t *addr) -{ - writing.type = RAW_HEADER_TYPE_RAW; - writing.compressedLength = writing.length; - writing.data = addr + writing.offset; - return UpdateLastFrame(addr); -} - -int32_t RawMaker::PrepareInCompress(const uint8_t *addr) -{ - writing.type = RAW_HEADER_TYPE_COMPRESSED; - - uLongf clen = compressBound(writing.length); - compressed = std::make_unique(clen); - auto ret = compress(compressed.get(), &clen, addr + writing.offset, writing.length); - if (ret != Z_OK) { - GSLOG2HI(ERROR) << "compress failed with " << ret; - return ret; - } - - writing.compressedLength = static_cast(clen); - writing.data = compressed.get(); - return UpdateLastFrame(addr); -} - -int32_t RawMaker::UpdateLastFrame(const uint8_t *addr) -{ - auto dst = lastFrame.get() + writing.offset; - auto dstlen = size - writing.offset; - auto src = writing.data; - auto srclen = writing.length; - auto ret = memcpy_s(dst, dstlen, src, srclen); - if (ret) { - GSLOG2HI(ERROR) << "memcpy_s failed with <" << strerror(errno) << ">" - << ", params: " << "dstlen(" << dstlen << "), srclen(" << srclen << ")"; - return ret; - } - return 0; -} - -int32_t RawMaker::WriteData() -{ - WriteInt32(writing.type); - WriteInt32(writing.offset); - WriteInt32(writing.length); - WriteInt32(writing.compressedLength); - ofs.write(reinterpret_cast(writing.data), writing.compressedLength); - - int32_t align = writing.compressedLength % 0x4; - while (align) { - align = (align + 1) % 0x4; - ofs.write("\0", 1); - } - return 0; -} - -void RawMaker::WriteInt32(int32_t integer) -{ - ofs.write(reinterpret_cast(&integer), sizeof(integer)); -} - -void RawMaker::CompareWithLastFrame(const uint8_t *addr) -{ - writing.length = 0; - writing.offset = size; - for (int32_t i = 0; i < size; i++) { - if (addr[i] != lastFrame[i]) { - writing.offset = i; - break; - } - } - - for (int32_t i = size - 1; i >= writing.offset; i++) { - if (addr[i] != lastFrame[i]) { - writing.length = i - writing.offset + 1; - break; - } - } -} - -int32_t RawMaker::DoFirstFrame() -{ - firstFrame = false; - ofs.open(filename, std::ofstream::trunc | std::ofstream::binary | std::ofstream::out); - if (errno) { - GSLOG2HI(ERROR) << "open " << filename << ", because " << strerror(errno); - return errno; - } - - lastFrame = std::make_unique(static_cast(size)); - ofs.write("RAW.dif2", 0x8); - WriteInt32(static_cast(width)); - WriteInt32(height); - ofs.close(); - return 0; -} -} // namespace OHOS diff --git a/utils/raw_parser/BUILD.gn b/utils/raw_parser/BUILD.gn deleted file mode 100644 index b870924e73..0000000000 --- a/utils/raw_parser/BUILD.gn +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) 2021 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. - -import("//build/ohos.gni") - -## Build raw_parser.a {{{ -config("raw_parser_config") { - visibility = [ ":*" ] - - cflags = [ - "-Wall", - "-Werror", - "-g3", - ] -} - -config("raw_parser_public_config") { - include_dirs = [ "export" ] -} - -ohos_static_library("raw_parser") { - sources = [ "src/raw_parser.cpp" ] - - configs = [ ":raw_parser_config" ] - - public_configs = [ ":raw_parser_public_config" ] - - deps = [ "..:libgslogger" ] - - subsystem_name = "graphic" - part_name = "graphic_2d" - external_deps = [ - "c_utils:utils", - "zlib:libz", - ] -} -## Build raw_parser.a }}} diff --git a/utils/raw_parser/data/generate_raw.sh b/utils/raw_parser/data/generate_raw.sh deleted file mode 100755 index 5d8c1f575a..0000000000 --- a/utils/raw_parser/data/generate_raw.sh +++ /dev/null @@ -1,132 +0,0 @@ -#!/bin/bash -# Copyright (c) 2021 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. - -set -e - -GENERATE_RAW=raw.raw -# put jpg -# bash generate_raw.sh - -declare -A HEADER_TYPE=( - [NONE]=0 - [RAW]=1 - [COMPRESSED]=2 -) - -echo_int32_t_to_bin() -{ - local int32_t=$1 - - local big_endian=$(printf "%08x" $int32_t) - local little_endian=${big_endian:6:2}${big_endian:4:2}${big_endian:2:2}${big_endian:0:2} - echo "0: $little_endian" | xxd -r -} - -get_file_size() -{ - local filename=$1 - - du -b $filename | awk '{print $1}' -} - -echo_file_part() -{ - local filename=$1 - local position=$2 - local length=$3 - - xxd -l $length -s $position -o $((-$position)) $filename | xxd -r -} - -main() -{ - local width=$1 - local height=$2 - ls * | while read filename; do - # check mime type - file $filename | grep "image" >/dev/null 2>&1 - if [ $? != 0 ]; then - continue - fi - - # generate raw data - convert $filename $filename.rgba - xxd -c 1 $filename.rgba > $filename.xxd - ofilename=$filename.rgba - - if [ "$last_filename" = "" ]; then - # first image - header_type=${HEADER_TYPE["RAW"]} - position=0 - length="$(get_file_size $ofilename)" - else - # damage range - result="$(diff -y $filename.xxd $last_filename.xxd | grep " |$(echo -e "\x09")")" - if [ "$result" = "" ]; then - header_type=${HEADER_TYPE["NONE"]} - position=0 - length=0 - else - header_type=${HEADER_TYPE["RAW"]} - position="$(printf "%d\n" 0x$(echo "$result" | head -1 | awk '{print $1}' | cut -d: -f1))" - length="$(printf "%d\n" 0x$(echo "$result" | tail -1 | awk '{print $1}' | cut -d: -f1))" - ((length -= ${position})) - ((length = $length / 4 * 4)) - fi - fi - - # compress - clen=$length - if [ "$header_type" = "${HEADER_TYPE["RAW"]}" ]; then - header_type=${HEADER_TYPE["COMPRESSED"]} - ofilename=$filename.compress - echo_file_part $filename.rgba $position $length | zlib-flate -compress=9 > $ofilename - clen=$(get_file_size $ofilename) - else - if [ "$header_type" = "${HEADER_TYPE["NONE"]}" ]; then - clen=0 - fi - fi - - if [ "$last_filename" = "" ]; then - echo -en "RAW.dif2" > $GENERATE_RAW - echo_int32_t_to_bin $width >> $GENERATE_RAW - echo_int32_t_to_bin $height >> $GENERATE_RAW - fi - echo_int32_t_to_bin $header_type >> $GENERATE_RAW - echo_int32_t_to_bin $position >> $GENERATE_RAW - echo_int32_t_to_bin $length >> $GENERATE_RAW - echo_int32_t_to_bin $clen >> $GENERATE_RAW - echo_file_part $ofilename 0 $clen >> $GENERATE_RAW - - # for BUS_ADRALN - (( align = $clen - $clen / 4 * 4 )) - [ "$align" != "0" ] && (( align = 4 - $align )) - [ "$align" != "0" ] && echo -en "\x00" >> $GENERATE_RAW && (( align-- )) - [ "$align" != "0" ] && echo -en "\x00" >> $GENERATE_RAW && (( align-- )) - [ "$align" != "0" ] && echo -en "\x00" >> $GENERATE_RAW && (( align-- )) - - echo $filename $header_type $position $length $clen - - last_filename=$filename - done - - rm -f *.rgba - rm -f *.xxd - rm -f *.compress - return 0 -} - -main $* -exit $? diff --git a/utils/raw_parser/export/raw_parser.h b/utils/raw_parser/export/raw_parser.h deleted file mode 100644 index e14ff78352..0000000000 --- a/utils/raw_parser/export/raw_parser.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2021 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 FRAMEWORKS_BOOTANIMATION_INCLUDE_RAW_PARSER_H -#define FRAMEWORKS_BOOTANIMATION_INCLUDE_RAW_PARSER_H - -#include -#include -#include - -namespace OHOS { -enum RawHeaderType { - RAW_HEADER_TYPE_NONE, - RAW_HEADER_TYPE_RAW, - RAW_HEADER_TYPE_COMPRESSED, -}; - -struct RawFrameInfoPtr { - enum RawHeaderType type; - uint32_t offset; - uint32_t length; - uint32_t clen; - uint8_t *mem; -}; - -struct RawHeaderInfo { - char magic[8]; - uint32_t width; - uint32_t height; -}; - -struct RawFrameInfo { - enum RawHeaderType type; - uint32_t offset; - uint32_t length; - uint32_t clen; - uint8_t mem[0]; -}; - -class RawParser { -public: - // 0 for success - int32_t Parse(const std::string &file); - - uint32_t GetWidth() const - { - return width; - } - - uint32_t GetHeight() const - { - return height; - } - - uint32_t GetSize() const - { - return width * height * 0x4; - } - - int32_t GetCount() const - { - return infos.size(); - } - - // 0 for success - int32_t GetNextData(uint32_t *addr); - int32_t GetNowData(uint32_t *addr); - -private: - int32_t ReadFile(const std::string &file, std::unique_ptr &ptr); - - // 0 for success - int32_t Uncompress(std::unique_ptr &dst, uint32_t dstlen, uint8_t *cmem, uint32_t clen); - - std::unique_ptr compressed = nullptr; - uint32_t clength = 0; - - std::vector infos; - std::unique_ptr uncompressed = nullptr; - - int32_t lastID = -1; - std::unique_ptr lastData = nullptr; - - uint32_t width = 0; - uint32_t height = 0; - - static constexpr int32_t magicHeaderLength = 16; -}; -} // namespace OHOS - -#endif // FRAMEWORKS_BOOTANIMATION_INCLUDE_RAW_PARSER_H diff --git a/utils/raw_parser/src/raw_parser.cpp b/utils/raw_parser/src/raw_parser.cpp deleted file mode 100644 index d770f6050f..0000000000 --- a/utils/raw_parser/src/raw_parser.cpp +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) 2021 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. - */ - -#include "raw_parser.h" - -#include -#include -#include -#include -#include -#include - -#include - -namespace OHOS { -namespace { -DEFINE_HILOG_LABEL("RawParser"); -} // namespace - -int32_t RawParser::Parse(const std::string &file) -{ - int32_t ret = ReadFile(file, compressed); - if (ret) { - GSLOG2HI(ERROR) << "ReadFile failed with" << ret; - return ret; - } - - auto minfo = reinterpret_cast(&compressed[0]); - if (strncmp(minfo->magic, "RAW.dif2", 0x8) != 0) { - GSLOG2HI(ERROR) << "magic header mistake, is " << minfo->magic; - return -1; - } - - width = minfo->width; - height = minfo->height; - lastData = std::make_unique(GetSize()); - - struct RawFrameInfo *info = reinterpret_cast(&compressed[magicHeaderLength]); - uint32_t ipos = reinterpret_cast(info) - reinterpret_cast(minfo); - while (ipos < clength) { - GSLOG2HI(DEBUG) << info->type << ", " << info->offset << ", " << info->length << ", " << info->clen; - if (info->clen < 0) { - GSLOG2HI(ERROR) << "clen < 0"; - return -1; - } - - struct RawFrameInfoPtr zi = { info->type, info->offset, info->length, info->clen, info->mem }; - infos.push_back(zi); - - // for BUS_ADRALN - constexpr uint32_t memalign = 4; - uint32_t align = info->clen - info->clen / memalign * memalign; - if (align) { - align = memalign - align; - } - info = reinterpret_cast(info->mem + info->clen + align); - ipos = reinterpret_cast(info) - reinterpret_cast(minfo); - } - - if (infos.empty()) { - GSLOG2HI(ERROR) << "infos is empty"; - return -1; - } - - return 0; -} - -int32_t RawParser::GetNextData(uint32_t *addr) -{ - const int32_t count = (lastID + 1) % static_cast(infos.size()); - if (count < 0) { - GSLOG2HI(ERROR) << "current count < 0"; - return -1; - } - auto type = infos[count].type; - if (type == RAW_HEADER_TYPE_NONE) { - lastID = count; - return GetNowData(addr); - } - - auto offset = infos[count].offset; - auto length = infos[count].length; - auto clen = infos[count].clen; - if (type == RAW_HEADER_TYPE_COMPRESSED) { - if (length == 0) { - GSLOG2HI(INFO) << "length == 0"; - lastID = count; - return GetNowData(addr); - } - - uncompressed = std::make_unique(length); - int32_t ret = Uncompress(uncompressed, length, infos[count].mem, clen); - if (ret) { - GSLOG2HI(ERROR) << "uncompress failed"; - return -1; - } - } else if (type == RAW_HEADER_TYPE_RAW) { - uncompressed = std::make_unique(length); - if (memcpy_s(uncompressed.get(), length, infos[count].mem, clen)) { - GSLOG2HI(ERROR) << "memcpy failed"; - return -1; - } - } - - lastID = count; - if (length > 0 && memcpy_s(lastData.get() + offset, GetSize() - offset, - uncompressed.get(), length) != EOK) { - GSLOG2HI(ERROR) << "memcpy failed"; - return -1; - } - - return GetNowData(addr); -} - -int32_t RawParser::GetNowData(uint32_t *addr) -{ - if (memcpy_s(addr, GetSize(), lastData.get(), GetSize()) != EOK) { - GSLOG2HI(ERROR) << "memcpy failed"; - return -1; - } - return 0; -} - -int32_t RawParser::ReadFile(const std::string &file, std::unique_ptr &ptr) -{ - std::ifstream ifs(file, std::ifstream::in | std::ifstream::binary); - if (!ifs.good()) { - GSLOG2HI(ERROR) << "read file failed"; - return 1; - } - - ifs.seekg(0, ifs.end); - clength = static_cast(ifs.tellg()); - ifs.seekg (0, ifs.beg); - - ptr = std::make_unique(static_cast(clength)); - ifs.read(reinterpret_cast(ptr.get()), clength); - return 0; -} - -int32_t RawParser::Uncompress(std::unique_ptr &dst, uint32_t dstlen, uint8_t *cmem, uint32_t clen) -{ - unsigned long ulength = dstlen; - auto ret = uncompress(dst.get(), &ulength, cmem, clen); - if (ret) { - GSLOG2HI(ERROR) << "uncompress failed"; - } - return ret; -} -} // namespace OHOS diff --git a/utils/scoped_bytrace/BUILD.gn b/utils/scoped_bytrace/BUILD.gn deleted file mode 100644 index 9bce638662..0000000000 --- a/utils/scoped_bytrace/BUILD.gn +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) 2021 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. - -import("//build/ohos.gni") - -## Build scoped_bytrace.a {{{ -config("scoped_bytrace_config") { - visibility = [ ":*" ] - - cflags = [ - "-Wall", - "-Werror", - "-g3", - ] -} - -config("scoped_bytrace_public_config") { - include_dirs = [ "export" ] -} - -ohos_static_library("scoped_bytrace") { - sources = [ "src/scoped_bytrace.cpp" ] - - configs = [ ":scoped_bytrace_config" ] - - public_configs = [ ":scoped_bytrace_public_config" ] - - external_deps = [ - "hilog:libhilog", - "hitrace:hitrace_meter", - "init:libbegetutil", - ] - - subsystem_name = "graphic" - part_name = "graphic_2d" -} -## Build scoped_bytrace.a }}} diff --git a/utils/scoped_bytrace/export/scoped_bytrace.h b/utils/scoped_bytrace/export/scoped_bytrace.h deleted file mode 100644 index ee5b6ff91d..0000000000 --- a/utils/scoped_bytrace/export/scoped_bytrace.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2021 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 UTILS_TRACE_SCOPED_BYTRACE_H -#define UTILS_TRACE_SCOPED_BYTRACE_H - -#include - -class ScopedBytrace { -public: - ScopedBytrace(const std::string &proc); - ~ScopedBytrace(); - - void End(); - -private: - std::string proc_; - bool isEnd = false; -}; - -class ScopedDebugTrace { -public: - ScopedDebugTrace(const std::string &traceStr); - ~ScopedDebugTrace(); - - static bool isEnabled() - { - return debugTraceEnabled_; - } - -private: - static bool debugTraceEnabled_; -}; - -#endif // UTILS_TRACE_SCOPED_BYTRACE_H diff --git a/utils/scoped_bytrace/export/scoped_trace_fmt.h b/utils/scoped_bytrace/export/scoped_trace_fmt.h deleted file mode 100644 index 9c667519d8..0000000000 --- a/utils/scoped_bytrace/export/scoped_trace_fmt.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2024 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 SCOPED_TRACE_FMT_H -#define SCOPED_TRACE_FMT_H - -#include -#include "parameters.h" - -static bool g_debugTraceEnabled = - std::atoi((OHOS::system::GetParameter("persist.sys.graphic.openDebugTrace", "0")).c_str()) != 0; - -#define SCOPED_DEBUG_TRACE_FMT(fmt, ...) \ - do { \ - if (g_debugTraceEnabled) { \ - HITRACE_METER_FMT(HITRACE_TAG_GRAPHIC_AGP, fmt, ##__VA_ARGS__); \ - } \ - } while (0) - -#endif // SCOPED_TRACE_FMT_H diff --git a/utils/scoped_bytrace/src/scoped_bytrace.cpp b/utils/scoped_bytrace/src/scoped_bytrace.cpp deleted file mode 100644 index a73fbaa394..0000000000 --- a/utils/scoped_bytrace/src/scoped_bytrace.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2021 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. - */ - -#include "scoped_bytrace.h" - -#include -#include -#include "parameters.h" - -ScopedBytrace::ScopedBytrace(const std::string &proc) : proc_(proc) -{ - StartTrace(HITRACE_TAG_GRAPHIC_AGP, proc_); - isEnd = false; -} - -ScopedBytrace::~ScopedBytrace() -{ - if (isEnd == false) { - FinishTrace(HITRACE_TAG_GRAPHIC_AGP); - } -} - -void ScopedBytrace::End() -{ - if (isEnd == false) { - FinishTrace(HITRACE_TAG_GRAPHIC_AGP); - } -} - -bool ScopedDebugTrace::debugTraceEnabled_ = - std::atoi((OHOS::system::GetParameter("persist.sys.graphic.openDebugTrace", "0")).c_str()) != 0; -ScopedDebugTrace::ScopedDebugTrace(const std::string &traceStr) -{ - if (debugTraceEnabled_) { - StartTrace(HITRACE_TAG_GRAPHIC_AGP, traceStr); - } -} -ScopedDebugTrace::~ScopedDebugTrace() -{ - if (debugTraceEnabled_) { - FinishTrace(HITRACE_TAG_GRAPHIC_AGP); - } -} diff --git a/utils/semaphore/BUILD.gn b/utils/semaphore/BUILD.gn deleted file mode 100644 index 237843476d..0000000000 --- a/utils/semaphore/BUILD.gn +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) 2021 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. - -import("//build/ohos.gni") - -## Build semaphore.a {{{ -config("semaphore_config") { - visibility = [ ":semaphore" ] - - cflags = [ - "-Wall", - "-Werror", - "-g3", - ] -} - -config("semaphore_public_config") { - include_dirs = [ "export" ] -} - -ohos_static_library("semaphore") { - sources = [ "src/local_semaphore.cpp" ] - - configs = [ ":semaphore_config" ] - - public_configs = [ ":semaphore_public_config" ] - - part_name = "graphic_2d" - subsystem_name = "graphic" -} -## Build semaphore.a }}} diff --git a/utils/semaphore/export/local_semaphore.h b/utils/semaphore/export/local_semaphore.h deleted file mode 100644 index 2e8897ac2a..0000000000 --- a/utils/semaphore/export/local_semaphore.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2021 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 UTILS_INCLUDE_LOCAL_SEMAPHORE_H -#define UTILS_INCLUDE_LOCAL_SEMAPHORE_H - -#include - -namespace OHOS { -class LocalSemaphore { -public: - LocalSemaphore(int count = 0); - ~LocalSemaphore(); - - void Inc(); - void Dec(); - -private: - sem_t sem; -}; -} // namespace OHOS - -#endif // UTILS_INCLUDE_LOCAL_SEMAPHORE_H diff --git a/utils/semaphore/src/local_semaphore.cpp b/utils/semaphore/src/local_semaphore.cpp deleted file mode 100644 index 1920e8f16b..0000000000 --- a/utils/semaphore/src/local_semaphore.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2021 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. - */ - -#include "local_semaphore.h" - -#include -#include - -namespace OHOS { -LocalSemaphore::LocalSemaphore(int count) -{ - sem_init(&sem, false, static_cast(count)); -} - -LocalSemaphore::~LocalSemaphore() -{ - sem_destroy(&sem); -} - -void LocalSemaphore::Inc() -{ - sem_post(&sem); -} - -void LocalSemaphore::Dec() -{ - int32_t ret = 0; - do { - ret = sem_wait(&sem); - } while (ret == -1 && errno == EINTR); -} -} // namespace OHOS diff --git a/utils/wmlayout/gen_scss.py b/utils/wmlayout/gen_scss.py deleted file mode 100755 index 2778d1438e..0000000000 --- a/utils/wmlayout/gen_scss.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -# Copyright (c) 2021 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. - -import optparse -import subprocess -import sys - - -def parse_args(args): - parser = optparse.OptionParser() - parser.add_option("--input") - parser.add_option("--output") - parser.add_option("--cmd") - opts, _ = parser.parse_args(args) - return opts - -if __name__ == '__main__': - options = parse_args(sys.argv[1:]) - parse_scripts = subprocess.check_call( - [options.cmd, options.input, options.output]) diff --git a/utils/wmlayout/wmlayout.gni b/utils/wmlayout/wmlayout.gni deleted file mode 100644 index 34b99c36f4..0000000000 --- a/utils/wmlayout/wmlayout.gni +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright (c) 2021 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. - -import("//build/ohos.gni") - -wmlayout_scss_gni_filepath = "//foundation/graphic/graphic_2d/utils/wmlayout" - -template("wmlayout_scss") { - scss_name = invoker.scss - generate_binary_name = "${target_name}_binary" - prebuilt_etc_name = "${target_name}_etc" - - scss_filename = "$root_gen_dir/${target_name}" - action(generate_binary_name) { - script = "$wmlayout_scss_gni_filepath/gen_scss.py" - inputs = [ - script, - scss_name, - ] - outputs = [ scss_filename ] - label = "//foundation/graphic/graphic_2d/frameworks/wmserver/src/wmlayout_scss_parser:wmlayout_scss_parser($host_toolchain)" - deps = [ label ] - args = [ - "--cmd", - "./" + - rebase_path(get_label_info(label, "root_out_dir"), root_build_dir) + - "/graphic/graphic_2d/wmlayout_scss_parser", - "--input", - rebase_path(scss_name, root_build_dir), - "--output", - rebase_path(scss_filename, root_build_dir), - ] - } - - ohos_prebuilt_etc(prebuilt_etc_name) { - forward_variables_from(invoker, - [ - "part_name", - "subsystem_name", - ]) - source = scss_filename - relative_install_dir = "wmlayout.d" - deps = [ ":${generate_binary_name}" ] - } - - group(target_name) { - public_deps = [ ":${prebuilt_etc_name}" ] - } -}