1 /* 2 * Copyright (c) 2024 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 #ifndef GLES_GPU_RESOURCE_UTIL_GLES_H 17 #define GLES_GPU_RESOURCE_UTIL_GLES_H 18 19 #include <base/containers/string_view.h> 20 #include <render/namespace.h> 21 22 BASE_BEGIN_NAMESPACE() 23 class ByteArray; 24 BASE_END_NAMESPACE() 25 RENDER_BEGIN_NAMESPACE() 26 class GpuBuffer; 27 class GpuImage; 28 class GpuSampler; 29 class IDevice; 30 namespace GpuResourceUtil { 31 void CopyGpuBufferGLES(GpuBuffer& buffer, BASE_NS::ByteArray& byteArray); 32 void DebugBufferNameGLES(const IDevice& device, const GpuBuffer& buffer, const BASE_NS::string_view name); 33 void DebugImageNameGLES(const IDevice& device, const GpuImage& image, const BASE_NS::string_view name); 34 void DebugSamplerNameGLES(const IDevice& device, const GpuSampler& sampler, const BASE_NS::string_view name); 35 } // namespace GpuResourceUtil 36 RENDER_END_NAMESPACE() 37 38 #endif // GLES_GPU_RESOURCE_UTIL_GLES_H 39