1 /* 2 * Copyright (c) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef RME_CORE_SCHED_H 17 #define RME_CORE_SCHED_H 18 19 #include <unistd.h> 20 #include "rme_log_domain.h" 21 #include "rme_scoped_trace.h" 22 23 namespace OHOS { 24 namespace RME { 25 class RmeCoreSched { 26 public: 27 RmeCoreSched(); 28 ~RmeCoreSched(); 29 30 bool Init(); 31 void HandleBeginFrame(); 32 void HandleEndFrame(); 33 void BeginFlushAnimation(); 34 void EndFlushAnimation(); 35 void BeginFlushBuild(); 36 void EndFlushBuild(); 37 void BeginFlushLayout(); 38 void EndFlushLayout(); 39 void BeginFlushRender(); 40 void EndFlushRender(); 41 void BeginFlushRenderFinish(); 42 void EndFlushRenderFinish(); 43 44 void BeginProcessPostFlush(); 45 void ProcessCommandsStart(); 46 void AnimateStart(); 47 void RenderStart(); 48 void SendCommandsStart(); 49 50 RmeCoreSched(const RmeCoreSched &) = delete; 51 RmeCoreSched &operator=(const RmeCoreSched &) = delete; 52 private: 53 int m_pid = -1; 54 int m_rtg = -1; 55 int m_renderTid = -1; 56 int m_uiTid = -1; 57 }; 58 } // namespace RME 59 } // namespace OHOS 60 #endif 61