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 FRAME_UI_INTF_H 17 #define FRAME_UI_INTF_H 18 19 #include <cstdint> 20 21 namespace OHOS { 22 namespace RME { 23 class FrameUiIntf { 24 public: 25 static FrameUiIntf& GetInstance(); 26 void Init(); 27 int GetSenseSchedEnable(); 28 void BeginFlushAnimation() const; 29 void EndFlushAnimation() const; 30 31 void BeginFlushBuild() const; 32 void EndFlushBuild() const; 33 void BeginFlushLayout() const; 34 void EndFlushLayout() const; 35 36 void BeginFlushRender() const; 37 void EndFlushRender() const; 38 39 void BeginFlushRenderFinish() const; 40 void EndFlushRenderFinish() const; 41 42 void BeginProcessPostFlush() const; 43 void ProcessCommandsStart() const; 44 void AnimateStart() const; 45 void RenderStart(uint64_t timestamp) const; 46 void RenderEnd() const; 47 void SendCommandsStart() const; 48 49 void BeginListFling() const; 50 void EndListFling() const; 51 void FlushBegin() const; 52 void FlushEnd() const; 53 void SetFrameParam(int requestId, int load, int schedFrameNum, int value) const; 54 55 void HandleSwapBuffer() const; 56 void RequestNextVSync() const; 57 void EnableSelfRender() const; 58 void DisableSelfRender() const; 59 void ReceiveVSync() const; 60 void MonitorGpuStart() const; 61 void MonitorGpuEnd() const; 62 private: 63 bool inited = false; 64 }; 65 } // namespace RME 66 } // namespace OHOS 67 #endif 68