#include "dawn/native/SwapChain.h"
#include <utility>
#include <vector>
#include "dawn/common/Constants.h"
#include "dawn/native/Device.h"
#include "dawn/native/ObjectType_autogen.h"
#include "dawn/native/PhysicalDevice.h"
#include "dawn/native/Surface.h"
#include "dawn/native/Texture.h"
#include "dawn/native/ValidationUtils_autogen.h"
namespace dawn::native {
namespace {
class ErrorSwapChain final : public SwapChainBase { … };
}
MaybeError ValidateSwapChainDescriptor(const DeviceBase* device,
const Surface* surface,
const SwapChainDescriptor* descriptor) { … }
TextureDescriptor GetSwapChainBaseTextureDescriptor(SwapChainBase* swapChain) { … }
SwapChainBase::SwapChainBase(DeviceBase* device,
Surface* surface,
const SurfaceConfiguration* config)
: … { … }
FormatSet SwapChainBase::ComputeViewFormatSet() const { … }
SwapChainBase::~SwapChainBase() { … }
SwapChainBase::SwapChainBase(DeviceBase* device,
const SurfaceConfiguration* config,
ObjectBase::ErrorTag tag)
: … { … }
Ref<SwapChainBase> SwapChainBase::MakeError(DeviceBase* device,
const SurfaceConfiguration* config) { … }
void SwapChainBase::DestroyImpl() { … }
ObjectType SwapChainBase::GetType() const { … }
void SwapChainBase::DetachFromSurface() { … }
void SwapChainBase::SetIsAttached() { … }
void SwapChainBase::APIConfigure(wgpu::TextureFormat format,
wgpu::TextureUsage allowedUsage,
uint32_t width,
uint32_t height) { … }
TextureBase* SwapChainBase::APIGetCurrentTexture() { … }
TextureViewBase* SwapChainBase::APIGetCurrentTextureView() { … }
ResultOrError<SurfaceTexture> SwapChainBase::GetCurrentTexture() { … }
ResultOrError<Ref<TextureViewBase>> SwapChainBase::GetCurrentTextureView() { … }
void SwapChainBase::APIPresent() { … }
uint32_t SwapChainBase::GetWidth() const { … }
uint32_t SwapChainBase::GetHeight() const { … }
wgpu::TextureFormat SwapChainBase::GetFormat() const { … }
const std::vector<wgpu::TextureFormat>& SwapChainBase::GetViewFormats() const { … }
wgpu::TextureUsage SwapChainBase::GetUsage() const { … }
wgpu::PresentMode SwapChainBase::GetPresentMode() const { … }
wgpu::CompositeAlphaMode SwapChainBase::GetAlphaMode() const { … }
Surface* SwapChainBase::GetSurface() const { … }
bool SwapChainBase::IsAttached() const { … }
wgpu::BackendType SwapChainBase::GetBackendType() const { … }
MaybeError SwapChainBase::ValidatePresent() const { … }
MaybeError SwapChainBase::ValidateGetCurrentTexture() const { … }
void SwapChainBase::SetChildLabel(ApiObjectBase* child) const { … }
}