Skip to content

Commit

Permalink
Account for updated GrVkFormatToPixelConfig signature. (flutter#3615)
Browse files Browse the repository at this point in the history
Fixes Vulkan backend.
  • Loading branch information
chinmaygarde authored Apr 21, 2017
1 parent c447413 commit 9740093
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion vulkan/vulkan_device.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
}
Expand Down
4 changes: 2 additions & 2 deletions vulkan/vulkan_swapchain.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9740093

Please sign in to comment.