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