Account for updated GrVkFormatToPixelConfig signature. (flutter/engine#3615)

Fixes Vulkan backend.
This commit is contained in:
Chinmay Garde
2017-04-21 15:15:36 -07:00
committed by GitHub
parent f15c80f251
commit b90200a5bb
2 changed files with 4 additions and 3 deletions

View File

@@ -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];
}
}

View File

@@ -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;
}