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_wrapper.h" 17 18 #include "base/bridge/ark_web_bridge_macros.h" 19 20 namespace OHOS::ArkWeb { 21 ArkNativeBufferConfigAdapterWrapper(ArkWebRefPtr<ArkNativeBufferConfigAdapter> ref)22ArkNativeBufferConfigAdapterWrapper::ArkNativeBufferConfigAdapterWrapper( 23 ArkWebRefPtr<ArkNativeBufferConfigAdapter> ref) : ctocpp_(ref) 24 {} 25 GetBufferWidth()26int ArkNativeBufferConfigAdapterWrapper::GetBufferWidth() 27 { 28 return ctocpp_->GetBufferWidth(); 29 } 30 GetBufferHeight()31int ArkNativeBufferConfigAdapterWrapper::GetBufferHeight() 32 { 33 return ctocpp_->GetBufferHeight(); 34 } 35 GetBufferFormat()36int ArkNativeBufferConfigAdapterWrapper::GetBufferFormat() 37 { 38 return ctocpp_->GetBufferFormat(); 39 } 40 GetBufferUsage()41int ArkNativeBufferConfigAdapterWrapper::GetBufferUsage() 42 { 43 return ctocpp_->GetBufferUsage(); 44 } 45 GetBufferStride()46int ArkNativeBufferConfigAdapterWrapper::GetBufferStride() 47 { 48 return ctocpp_->GetBufferStride(); 49 } 50 SetBufferWidth(int width)51void ArkNativeBufferConfigAdapterWrapper::SetBufferWidth(int width) 52 { 53 ctocpp_->SetBufferWidth(width); 54 } 55 SetBufferHeight(int height)56void ArkNativeBufferConfigAdapterWrapper::SetBufferHeight(int height) 57 { 58 ctocpp_->SetBufferHeight(height); 59 } 60 SetBufferFormat(int format)61void ArkNativeBufferConfigAdapterWrapper::SetBufferFormat(int format) 62 { 63 ctocpp_->SetBufferFormat(format); 64 } 65 SetBufferUsage(int usage)66void ArkNativeBufferConfigAdapterWrapper::SetBufferUsage(int usage) 67 { 68 ctocpp_->SetBufferUsage(usage); 69 } 70 SetBufferStride(int stride)71void ArkNativeBufferConfigAdapterWrapper::SetBufferStride(int stride) 72 { 73 ctocpp_->SetBufferStride(stride); 74 } 75 } // namespace OHOS::ArkWeb 76