1 // 2 // Copyright 2020 The ANGLE Project Authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 // 6 7 // vk_android_utils.h: Vulkan utilities for using the Android platform 8 9 #ifndef LIBANGLE_RENDERER_VULKAN_ANDROID_VK_ANDROID_UTILS_H_ 10 #define LIBANGLE_RENDERER_VULKAN_ANDROID_VK_ANDROID_UTILS_H_ 11 12 #include <EGL/egl.h> 13 #include <EGL/eglext.h> 14 #include "common/vulkan/vk_headers.h" 15 #include "libANGLE/Error.h" 16 17 class ContextVk; 18 class Buffer; 19 class DeviceMemory; 20 21 namespace rx 22 { 23 24 class RendererVk; 25 26 namespace vk 27 { 28 angle::Result InitAndroidExternalMemory(ContextVk *contextVk, 29 EGLClientBuffer clientBuffer, 30 VkMemoryPropertyFlags memoryProperties, 31 Buffer *buffer, 32 VkMemoryPropertyFlags *memoryPropertyFlagsOut, 33 DeviceMemory *deviceMemoryOut); 34 35 void ReleaseAndroidExternalMemory(RendererVk *rendererVk, EGLClientBuffer clientBuffer); 36 } // namespace vk 37 } // namespace rx 38 39 #endif // LIBANGLE_RENDERER_VULKAN_ANDROID_VK_ANDROID_UTILS_H_ 40