Account for updated GrVkFormatToPixelConfig signature. (flutter/engine#3615)
Fixes Vulkan backend.
This commit is contained in:
@@ -281,7 +281,8 @@ bool VulkanDevice::ChooseSurfaceFormat(const VulkanSurface& surface,
|
||||
std::map<VkFormat, VkSurfaceFormatKHR> supported_formats;
|
||||
|
||||
for (uint32_t i = 0; i < format_count; i++) {
|
||||
if (GrVkFormatToPixelConfig(formats[i].format, nullptr /* dont care */)) {
|
||||
GrPixelConfig pixel_config = GrVkFormatToPixelConfig(formats[i].format);
|
||||
if (pixel_config != kUnknown_GrPixelConfig) {
|
||||
supported_formats[formats[i].format] = formats[i];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,9 +189,9 @@ sk_sp<SkSurface> VulkanSwapchain::CreateSkiaSurface(GrContext* gr_context,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
GrPixelConfig pixel_config = kUnknown_GrPixelConfig;
|
||||
GrPixelConfig pixel_config = GrVkFormatToPixelConfig(surface_format_.format);
|
||||
|
||||
if (!GrVkFormatToPixelConfig(surface_format_.format, &pixel_config)) {
|
||||
if (pixel_config == kUnknown_GrPixelConfig) {
|
||||
// Vulkan format unsupported by Skia.
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user