19762338dSopenharmony_ci/* 29762338dSopenharmony_ci * Copyright (c) 2023-2024 Huawei Device Co., Ltd. 39762338dSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 49762338dSopenharmony_ci * you may not use this file except in compliance with the License. 59762338dSopenharmony_ci * You may obtain a copy of the License at 69762338dSopenharmony_ci * 79762338dSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 89762338dSopenharmony_ci * 99762338dSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 109762338dSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 119762338dSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 129762338dSopenharmony_ci * See the License for the specific language governing permissions and 139762338dSopenharmony_ci * limitations under the License. 149762338dSopenharmony_ci */ 159762338dSopenharmony_ci 169762338dSopenharmony_ci#ifndef HDI_COMPOSITION_CHECK_H 179762338dSopenharmony_ci#define HDI_COMPOSITION_CHECK_H 189762338dSopenharmony_ci#include "v1_1/display_composer_type.h" 199762338dSopenharmony_ci#include "display_test_utils.h" 209762338dSopenharmony_ci 219762338dSopenharmony_cinamespace OHOS { 229762338dSopenharmony_cinamespace HDI { 239762338dSopenharmony_cinamespace Display { 249762338dSopenharmony_cinamespace TEST { 259762338dSopenharmony_cistruct Point { 269762338dSopenharmony_ci int32_t x = 0; 279762338dSopenharmony_ci int32_t y = 0; 289762338dSopenharmony_ci}; 299762338dSopenharmony_ci 309762338dSopenharmony_ciclass HdiCompositionCheck { 319762338dSopenharmony_cipublic: 329762338dSopenharmony_ci static HdiCompositionCheck& GetInstance() 339762338dSopenharmony_ci { 349762338dSopenharmony_ci static HdiCompositionCheck instace = HdiCompositionCheck(); 359762338dSopenharmony_ci return instace; 369762338dSopenharmony_ci } 379762338dSopenharmony_ci void Init(uint32_t w, uint32_t h) 389762338dSopenharmony_ci { 399762338dSopenharmony_ci dispW_ = w; 409762338dSopenharmony_ci dispH_ = h; 419762338dSopenharmony_ci } 429762338dSopenharmony_ci enum { 439762338dSopenharmony_ci CHECK_CENTER, 449762338dSopenharmony_ci CHECK_VERTEX 459762338dSopenharmony_ci }; 469762338dSopenharmony_ci int32_t Check(const std::vector<LayerSettings> &layers, 479762338dSopenharmony_ci const BufferHandle& clientBuffer, uint32_t checkType = CHECK_VERTEX) const; 489762338dSopenharmony_ci 499762338dSopenharmony_ciprivate: 509762338dSopenharmony_ci HdiCompositionCheck() {} 519762338dSopenharmony_ci ~HdiCompositionCheck() {} 529762338dSopenharmony_ci uint32_t dispW_ = 0; 539762338dSopenharmony_ci uint32_t dispH_ = 0; 549762338dSopenharmony_ci}; 559762338dSopenharmony_ci} // OHOS 569762338dSopenharmony_ci} // HDI 579762338dSopenharmony_ci} // Display 589762338dSopenharmony_ci} // TEST 599762338dSopenharmony_ci 609762338dSopenharmony_ci#endif // HDI_COMPOSITION_CHECK_H 61