Antonio Maiorano | c4a1bd4 | 2021-01-12 16:37:42 -0500 | [diff] [blame] | 1 | // Copyright 2021 The SwiftShader Authors. All Rights Reserved. |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | #ifndef SWIFTSHADER_HEADLESSSURFACEKHR_HPP |
| 16 | #define SWIFTSHADER_HEADLESSSURFACEKHR_HPP |
| 17 | |
| 18 | #include "VkSurfaceKHR.hpp" |
| 19 | |
| 20 | namespace vk { |
| 21 | |
| 22 | class HeadlessSurfaceKHR : public SurfaceKHR, public ObjectBase<HeadlessSurfaceKHR, VkSurfaceKHR> |
| 23 | { |
| 24 | public: |
| 25 | HeadlessSurfaceKHR(const VkHeadlessSurfaceCreateInfoEXT *pCreateInfo, void *mem); |
| 26 | |
| 27 | static size_t ComputeRequiredAllocationSize(const VkHeadlessSurfaceCreateInfoEXT *pCreateInfo); |
| 28 | |
| 29 | void destroySurface(const VkAllocationCallbacks *pAllocator) override; |
Antonio Maiorano | 5128643 | 2021-02-19 09:56:47 -0500 | [diff] [blame] | 30 | VkResult getSurfaceCapabilities(VkSurfaceCapabilitiesKHR *pSurfaceCapabilities) const override; |
Antonio Maiorano | c4a1bd4 | 2021-01-12 16:37:42 -0500 | [diff] [blame] | 31 | void attachImage(PresentImage *image) override; |
| 32 | void detachImage(PresentImage *image) override; |
| 33 | VkResult present(PresentImage *image) override; |
| 34 | }; |
| 35 | |
| 36 | } // namespace vk |
Sean Risser | 08762e3 | 2021-05-05 14:28:24 -0400 | [diff] [blame^] | 37 | #endif // SWIFTSHADER_HEADLESSSURFACEKHR_HPP |