blob: 1cfb2b1233c3fd2022122e6b16ff49bdb6df61ea [file] [log] [blame]
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#pragma once
#include "flutter/fml/macros.h"
#include "impeller/renderer/backend/vulkan/vk.h"
namespace impeller {
class SwapchainDetailsVK {
public:
static std::unique_ptr<SwapchainDetailsVK> Create(
vk::PhysicalDevice physical_device,
vk::SurfaceKHR surface);
SwapchainDetailsVK(vk::SurfaceCapabilitiesKHR capabilities,
std::vector<vk::SurfaceFormatKHR> surface_formats,
std::vector<vk::PresentModeKHR> surface_present_modes);
~SwapchainDetailsVK();
vk::SurfaceFormatKHR PickSurfaceFormat() const;
vk::PresentModeKHR PickPresentationMode() const;
vk::Extent2D PickExtent() const;
uint32_t GetImageCount() const;
vk::SurfaceTransformFlagBitsKHR GetTransform() const;
private:
vk::SurfaceCapabilitiesKHR surface_capabilities_;
std::vector<vk::SurfaceFormatKHR> surface_formats_;
std::vector<vk::PresentModeKHR> present_modes_;
FML_DISALLOW_COPY_AND_ASSIGN(SwapchainDetailsVK);
};
} // namespace impeller