• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 RENDER_SERVICE_CLIENT_CORE_TRANSACTION_RS_APPLICATION_AGENT_IMPL_H
17 #define RENDER_SERVICE_CLIENT_CORE_TRANSACTION_RS_APPLICATION_AGENT_IMPL_H
18 
19 #ifdef ROSEN_OHOS
20 #include "ipc_callbacks/rs_application_agent_stub.h"
21 #endif
22 
23 namespace OHOS {
24 namespace Rosen {
25 #ifdef ROSEN_OHOS
26 class RSApplicationAgentImpl final : public RSApplicationAgentStub {
27 #else
28 class RSApplicationAgentImpl final {
29 #endif
30 public:
31     static RSApplicationAgentImpl& Instance();
32     void RegisterRSApplicationAgent();
33 
34 private:
35     RSApplicationAgentImpl() = default;
36     virtual ~RSApplicationAgentImpl() = default;
37 
38     RSApplicationAgentImpl(const RSApplicationAgentImpl&) = delete;
39     RSApplicationAgentImpl(const RSApplicationAgentImpl&&) = delete;
40     RSApplicationAgentImpl& operator=(const RSApplicationAgentImpl&) = delete;
41     RSApplicationAgentImpl& operator=(const RSApplicationAgentImpl&&) = delete;
42 
43 #ifdef ROSEN_OHOS
44     void OnTransaction(std::shared_ptr<RSTransactionData> transactionData) override;
45     void OnRenderModeChanged(bool renderThreadNeedRender) override;
46     void NotifyClearBufferCache() override;
47 #endif
48 };
49 }
50 }
51 #endif // RENDER_SERVICE_CLIENT_CORE_TRANSACTION_RS_APPLICATION_AGENT_IMPL_H
52