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 #include "ohos_adapter/bridge/ark_buffer_request_config_adapter_wrapper.h"
17 
18 #include "base/bridge/ark_web_bridge_macros.h"
19 
20 namespace OHOS::ArkWeb {
21 
ArkBufferRequestConfigAdapterWrapper(ArkWebRefPtr<ArkBufferRequestConfigAdapter> ref)22 ArkBufferRequestConfigAdapterWrapper::ArkBufferRequestConfigAdapterWrapper(
23     ArkWebRefPtr<ArkBufferRequestConfigAdapter> ref)
24     : ctocpp_(ref)
25 {}
26 
GetWidth()27 int32_t ArkBufferRequestConfigAdapterWrapper::GetWidth()
28 {
29     return ctocpp_->GetWidth();
30 }
31 
GetHeight()32 int32_t ArkBufferRequestConfigAdapterWrapper::GetHeight()
33 {
34     return ctocpp_->GetHeight();
35 }
36 
GetStrideAlignment()37 int32_t ArkBufferRequestConfigAdapterWrapper::GetStrideAlignment()
38 {
39     return ctocpp_->GetStrideAlignment();
40 }
41 
GetFormat()42 int32_t ArkBufferRequestConfigAdapterWrapper::GetFormat()
43 {
44     return ctocpp_->GetFormat();
45 }
46 
GetUsage()47 uint64_t ArkBufferRequestConfigAdapterWrapper::GetUsage()
48 {
49     return ctocpp_->GetUsage();
50 }
51 
GetTimeout()52 int32_t ArkBufferRequestConfigAdapterWrapper::GetTimeout()
53 {
54     return ctocpp_->GetTimeout();
55 }
56 
GetColorGamut()57 NWeb::ColorGamutAdapter ArkBufferRequestConfigAdapterWrapper::GetColorGamut()
58 {
59     return (NWeb::ColorGamutAdapter)ctocpp_->GetColorGamut();
60 }
61 
GetTransformType()62 NWeb::TransformTypeAdapter ArkBufferRequestConfigAdapterWrapper::GetTransformType()
63 {
64     return (NWeb::TransformTypeAdapter)ctocpp_->GetTransformType();
65 }
66 
67 } // namespace OHOS::ArkWeb
68