• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 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_native_buffer_config_adapter_impl.h"
17 
18 namespace OHOS::ArkWeb {
19 
ArkNativeBufferConfigAdapterImpl(std::shared_ptr<OHOS::NWeb::NativeBufferConfigAdapter> ref)20 ArkNativeBufferConfigAdapterImpl::ArkNativeBufferConfigAdapterImpl(
21     std::shared_ptr<OHOS::NWeb::NativeBufferConfigAdapter> ref)
22     : real_(ref)
23 {}
24 
GetBufferWidth()25 int ArkNativeBufferConfigAdapterImpl::GetBufferWidth()
26 {
27     return real_->GetBufferWidth();
28 }
29 
GetBufferHeight()30 int ArkNativeBufferConfigAdapterImpl::GetBufferHeight()
31 {
32     return real_->GetBufferHeight();
33 }
34 
GetBufferFormat()35 int ArkNativeBufferConfigAdapterImpl::GetBufferFormat()
36 {
37     return real_->GetBufferFormat();
38 }
39 
GetBufferUsage()40 int ArkNativeBufferConfigAdapterImpl::GetBufferUsage()
41 {
42     return real_->GetBufferUsage();
43 }
44 
GetBufferStride()45 int ArkNativeBufferConfigAdapterImpl::GetBufferStride()
46 {
47     return real_->GetBufferStride();
48 }
49 
SetBufferWidth(int width)50 void ArkNativeBufferConfigAdapterImpl::SetBufferWidth(int width)
51 {
52     return real_->SetBufferWidth(width);
53 }
54 
SetBufferHeight(int height)55 void ArkNativeBufferConfigAdapterImpl::SetBufferHeight(int height)
56 {
57     return real_->SetBufferHeight(height);
58 }
59 
SetBufferFormat(int format)60 void ArkNativeBufferConfigAdapterImpl::SetBufferFormat(int format)
61 {
62     return real_->SetBufferFormat(format);
63 }
64 
SetBufferUsage(int usage)65 void ArkNativeBufferConfigAdapterImpl::SetBufferUsage(int usage)
66 {
67     return real_->SetBufferUsage(usage);
68 }
69 
SetBufferStride(int stride)70 void ArkNativeBufferConfigAdapterImpl::SetBufferStride(int stride)
71 {
72     return real_->SetBufferStride(stride);
73 }
74 } // namespace OHOS::ArkWeb
75