Loading libs/hwui/renderthread/VulkanSurface.cpp +38 −39 Original line number Diff line number Diff line Loading @@ -266,7 +266,8 @@ VulkanSurface* VulkanSurface::Create(ANativeWindow* window, ColorMode colorMode, vkPixelFormat = VK_FORMAT_R16G16B16A16_SFLOAT; } if (nullptr != vkManager.mGetPhysicalDeviceImageFormatProperties2) { LOG_ALWAYS_FATAL_IF(nullptr == vkManager.mGetPhysicalDeviceImageFormatProperties2, "vkGetPhysicalDeviceImageFormatProperties2 is missing"); VkPhysicalDeviceExternalImageFormatInfo externalImageFormatInfo; externalImageFormatInfo.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO; Loading Loading @@ -298,17 +299,15 @@ VulkanSurface* VulkanSurface::Create(ANativeWindow* window, ColorMode colorMode, return nullptr; } windowInfo.windowUsageFlags = hwbUsage.androidHardwareBufferUsage; uint64_t consumerUsage; native_window_get_consumer_usage(window, &consumerUsage); windowInfo.windowUsageFlags = consumerUsage | hwbUsage.androidHardwareBufferUsage; if (vkManager.isQualcomm()) { windowInfo.windowUsageFlags = windowInfo.windowUsageFlags | AHARDWAREBUFFER_USAGE_VENDOR_0; } } else { ALOGE("VulkanSurface::Create() vkmGetPhysicalDeviceImageFormatProperties2 is missing"); return nullptr; } /* * Now we attempt to modify the window! */ Loading Loading
libs/hwui/renderthread/VulkanSurface.cpp +38 −39 Original line number Diff line number Diff line Loading @@ -266,7 +266,8 @@ VulkanSurface* VulkanSurface::Create(ANativeWindow* window, ColorMode colorMode, vkPixelFormat = VK_FORMAT_R16G16B16A16_SFLOAT; } if (nullptr != vkManager.mGetPhysicalDeviceImageFormatProperties2) { LOG_ALWAYS_FATAL_IF(nullptr == vkManager.mGetPhysicalDeviceImageFormatProperties2, "vkGetPhysicalDeviceImageFormatProperties2 is missing"); VkPhysicalDeviceExternalImageFormatInfo externalImageFormatInfo; externalImageFormatInfo.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO; Loading Loading @@ -298,17 +299,15 @@ VulkanSurface* VulkanSurface::Create(ANativeWindow* window, ColorMode colorMode, return nullptr; } windowInfo.windowUsageFlags = hwbUsage.androidHardwareBufferUsage; uint64_t consumerUsage; native_window_get_consumer_usage(window, &consumerUsage); windowInfo.windowUsageFlags = consumerUsage | hwbUsage.androidHardwareBufferUsage; if (vkManager.isQualcomm()) { windowInfo.windowUsageFlags = windowInfo.windowUsageFlags | AHARDWAREBUFFER_USAGE_VENDOR_0; } } else { ALOGE("VulkanSurface::Create() vkmGetPhysicalDeviceImageFormatProperties2 is missing"); return nullptr; } /* * Now we attempt to modify the window! */ Loading