// // 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. // // SurfaceVk.h: // Defines the class interface for SurfaceVk, implementing SurfaceImpl. // #ifndef LIBANGLE_RENDERER_VULKAN_SURFACEVK_H_ #define LIBANGLE_RENDERER_VULKAN_SURFACEVK_H_ #include "common/CircularBuffer.h" #include "common/SimpleMutex.h" #include "common/vulkan/vk_headers.h" #include "libANGLE/renderer/SurfaceImpl.h" #include "libANGLE/renderer/vulkan/CommandProcessor.h" #include "libANGLE/renderer/vulkan/RenderTargetVk.h" #include "libANGLE/renderer/vulkan/vk_helpers.h" namespace rx { class SurfaceVk : public SurfaceImpl, public angle::ObserverInterface, public vk::Resource { … }; class OffscreenSurfaceVk : public SurfaceVk { … }; // Data structures used in WindowSurfaceVk namespace impl { static constexpr size_t kSwapHistorySize = …; // Old swapchain and associated present fences/semaphores that need to be scheduled for // recycling/destruction when appropriate. struct SwapchainCleanupData : angle::NonCopyable { … }; // Each present operation is associated with a wait semaphore. To know when that semaphore can be // recycled, a swapSerial is used. When that swapSerial is finished, the semaphore used in the // previous present operation involving imageIndex can be recycled. See doc/PresentSemaphores.md // for details. // When VK_EXT_swapchain_maintenance1 is supported, present fence is used instead of the swapSerial. // // Old swapchains are scheduled to be destroyed at the same time as the last wait semaphore used to // present an image to the old swapchains can be recycled (only relevant when // VK_EXT_swapchain_maintenance1 is not supported). struct ImagePresentOperation : angle::NonCopyable { … }; // Swapchain images and their associated objects. struct SwapchainImage : angle::NonCopyable { … }; // Associated data for a call to vkAcquireNextImageKHR without necessarily holding the share group // lock. struct UnlockedTryAcquireData : angle::NonCopyable { … }; struct UnlockedTryAcquireResult : angle::NonCopyable { … }; struct ImageAcquireOperation : angle::NonCopyable { … }; } // namespace impl enum class FramebufferFetchMode { … }; class WindowSurfaceVk : public SurfaceVk { … }; } // namespace rx #endif // LIBANGLE_RENDERER_VULKAN_SURFACEVK_H_