Skip to content

Commit

Permalink
Remove named field initialization of GrVkImageInfo (flutter#4972)
Browse files Browse the repository at this point in the history
This syntax fails in conjunction with the new 6-argument constructor
that's been added. Fields were already initialized in the correct
order, so simply omit the field names. Once the constructor lands,
this will switch to calling that.
  • Loading branch information
brianosman authored Apr 11, 2018
1 parent 4db7a00 commit 44bff28
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions content_handler/vulkan_surface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,12 @@ bool VulkanSurface::SetupSkiaSurface(sk_sp<GrContext> context,
}

const GrVkImageInfo image_info = {
.fImage = vk_image_,
.fAlloc = {vk_memory_, 0, memory_reqs.size, 0},
.fImageTiling = image_create_info.tiling,
.fImageLayout = image_create_info.initialLayout,
.fFormat = image_create_info.format,
.fLevelCount = image_create_info.mipLevels,
vk_image_, // image
{vk_memory_, 0, memory_reqs.size, 0}, // alloc
image_create_info.tiling, // tiling
image_create_info.initialLayout, // layout
image_create_info.format, // format
image_create_info.mipLevels, // level count
};

GrBackendRenderTarget sk_render_target(size.width(), size.height(), 0,
Expand Down
12 changes: 6 additions & 6 deletions vulkan/vulkan_swapchain.cc
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,12 @@ sk_sp<SkSurface> VulkanSwapchain::CreateSkiaSurface(
}

const GrVkImageInfo image_info = {
.fImage = image,
.fAlloc = GrVkAlloc(),
.fImageTiling = VK_IMAGE_TILING_OPTIMAL,
.fImageLayout = VK_IMAGE_LAYOUT_UNDEFINED,
.fFormat = surface_format_.format,
.fLevelCount = 1,
image, // image
GrVkAlloc(), // alloc
VK_IMAGE_TILING_OPTIMAL, // tiling
VK_IMAGE_LAYOUT_UNDEFINED, // layout
surface_format_.format, // format
1, // level count
};

// TODO(chinmaygarde): Setup the stencil buffer and the sampleCnt.
Expand Down

0 comments on commit 44bff28

Please sign in to comment.