1 /* 2 * Copyright (C) 2011 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 #pragma once 17 18 #include "render-utils/render_api_functions.h" 19 20 #include "aemu/base/c_header.h" 21 22 #include <KHR/khrplatform.h> 23 24 // All interfaces which can fail return an int, with zero indicating failure 25 // and anything else indicating success. 26 27 #ifndef USING_ANDROID_BP 28 ANDROID_BEGIN_HEADER 29 #endif 30 31 namespace gfxstream { 32 33 // Use KHRONOS_APICALL to control visibility, but do not use KHRONOS_APIENTRY 34 // because we don't need the functions to be __stdcall on Win32. 35 #define RENDER_APICALL KHRONOS_APICALL 36 #define RENDER_APIENTRY 37 38 #define RENDER_API_DECLARE(return_type, func_name, signature, callargs) \ 39 typedef return_type (RENDER_APIENTRY *func_name ## Fn) signature; \ 40 RENDER_APICALL return_type RENDER_APIENTRY func_name signature; 41 42 LIST_RENDER_API_FUNCTIONS(RENDER_API_DECLARE) 43 44 RENDER_APICALL RenderLibPtr RENDER_APIENTRY initLibrary(); 45 46 } // namespace gfxstream 47 48 #ifndef USING_ANDROID_BP 49 ANDROID_END_HEADER 50 #endif 51