Hash :
ab5acbd5
Author :
Date :
2019-01-23T13:58:09
Vulkan: implement swapchain resizing Vulkan allows a swapchain to be created based off of an older swapchain that's still presenting, to support seamless window resizing. The old swapchain will remain alive (though no image can be acquired from it) and automatically cleaned once no image is being presented from it. The retired swapchain can be destroyed once all operations on its images are completed. We store the old swapchain next to the serial of submission that's used for CPU throttling and defer the destroy call until after `finishToSerial` for that serial is called. Bug: angleproject:2942 Change-Id: Ic62a5a57b712ffa2b087f5fecde0dc8942194075 Reviewed-on: https://chromium-review.googlesource.com/c/1435634 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
//
// Copyright 2016 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// WindowSurfaceVkWin32.h:
// Defines the class interface for WindowSurfaceVkWin32, implementing WindowSurfaceVk.
//
#ifndef LIBANGLE_RENDERER_VULKAN_WIN32_WINDOWSURFACEVKWIN32_H_
#define LIBANGLE_RENDERER_VULKAN_WIN32_WINDOWSURFACEVKWIN32_H_
#include "libANGLE/renderer/vulkan/SurfaceVk.h"
namespace rx
{
class WindowSurfaceVkWin32 : public WindowSurfaceVk
{
public:
WindowSurfaceVkWin32(const egl::SurfaceState &surfaceState,
EGLNativeWindowType window,
EGLint width,
EGLint height);
private:
angle::Result createSurfaceVk(vk::Context *context, gl::Extents *extentsOut) override;
angle::Result getCurrentWindowSize(vk::Context *context, gl::Extents *extentsOut) override;
};
} // namespace rx
#endif // LIBANGLE_RENDERER_VULKAN_WIN32_WINDOWSURFACEVKWIN32_H_