1e9297d28Sopenharmony_ci/* 2e9297d28Sopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd. 3e9297d28Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4e9297d28Sopenharmony_ci * you may not use this file except in compliance with the License. 5e9297d28Sopenharmony_ci * You may obtain a copy of the License at 6e9297d28Sopenharmony_ci * 7e9297d28Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8e9297d28Sopenharmony_ci * 9e9297d28Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10e9297d28Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11e9297d28Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12e9297d28Sopenharmony_ci * See the License for the specific language governing permissions and 13e9297d28Sopenharmony_ci * limitations under the License. 14e9297d28Sopenharmony_ci */ 15e9297d28Sopenharmony_ci#ifndef FRAMEWORKS_OPENGL_WRAPPER_HOOK_H 16e9297d28Sopenharmony_ci#define FRAMEWORKS_OPENGL_WRAPPER_HOOK_H 17e9297d28Sopenharmony_ci 18e9297d28Sopenharmony_ci#include <EGL/egl.h> 19e9297d28Sopenharmony_ci#include <EGL/eglext.h> 20e9297d28Sopenharmony_ci#include <GLES3/gl3.h> 21e9297d28Sopenharmony_ci#include <GLES3/gl31.h> 22e9297d28Sopenharmony_ci#include <GLES3/gl32.h> 23e9297d28Sopenharmony_ci#include <GLES2/gl2.h> 24e9297d28Sopenharmony_ci#include <GLES2/gl2ext.h> 25e9297d28Sopenharmony_ci#include <GLES/gl.h> 26e9297d28Sopenharmony_ci#include <GLES/glext.h> 27e9297d28Sopenharmony_ci 28e9297d28Sopenharmony_cinamespace OHOS { 29e9297d28Sopenharmony_ci#undef CALL_HOOK_API 30e9297d28Sopenharmony_ci#define CALL_HOOK_API(...) 31e9297d28Sopenharmony_ci#undef CALL_HOOK_API_RET 32e9297d28Sopenharmony_ci#define CALL_HOOK_API_RET CALL_HOOK_API 33e9297d28Sopenharmony_ci#undef HOOK_API_ENTRY 34e9297d28Sopenharmony_ci#define HOOK_API_ENTRY(r, api, ...) r (*(api))(__VA_ARGS__); 35e9297d28Sopenharmony_ci 36e9297d28Sopenharmony_ciconstexpr int32_t EGL_API_NUM = 100; 37e9297d28Sopenharmony_ciconstexpr int32_t GL_API_NUM = 1000; 38e9297d28Sopenharmony_ci 39e9297d28Sopenharmony_ci// for compatibility, if xxx_entries.in file modified, the value of g_entriesFilesVersion must be increased by 1. 40e9297d28Sopenharmony_ciconstexpr uint64_t ENTRIES_FILES_VERSION = 1; 41e9297d28Sopenharmony_ci 42e9297d28Sopenharmony_cistruct WrapperHookTable { 43e9297d28Sopenharmony_ci #include "wrapper_hook_entries.in" 44e9297d28Sopenharmony_ci}; 45e9297d28Sopenharmony_ci 46e9297d28Sopenharmony_cistruct EglHookTable { 47e9297d28Sopenharmony_ci #include "egl_hook_entries.in" 48e9297d28Sopenharmony_ci}; 49e9297d28Sopenharmony_ci 50e9297d28Sopenharmony_cistruct GlHookTable1 { 51e9297d28Sopenharmony_ci #include "gl1_hook_entries.in" 52e9297d28Sopenharmony_ci}; 53e9297d28Sopenharmony_ci 54e9297d28Sopenharmony_cistruct GlHookTable2 { 55e9297d28Sopenharmony_ci #include "gl2_hook_entries.in" 56e9297d28Sopenharmony_ci}; 57e9297d28Sopenharmony_ci 58e9297d28Sopenharmony_cistruct GlHookTable3 { 59e9297d28Sopenharmony_ci #include "gl3_hook_entries.in" 60e9297d28Sopenharmony_ci}; 61e9297d28Sopenharmony_ci 62e9297d28Sopenharmony_cistruct GlHookTable { 63e9297d28Sopenharmony_ci GlHookTable1 table1; 64e9297d28Sopenharmony_ci GlHookTable2 table2; 65e9297d28Sopenharmony_ci GlHookTable3 table3; 66e9297d28Sopenharmony_ci}; 67e9297d28Sopenharmony_ci} // namespace OHOS 68e9297d28Sopenharmony_ci#endif // FRAMEWORKS_OPENGL_WRAPPER_HOOK_H 69