blob: 395b144e1d29665b26b14aee7e9ea8c71bc4257f [file] [log] [blame]
Antonio Maioranoc4a1bd42021-01-12 16:37:42 -05001// 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
20namespace vk {
21
22class HeadlessSurfaceKHR : public SurfaceKHR, public ObjectBase<HeadlessSurfaceKHR, VkSurfaceKHR>
23{
24public:
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 Maiorano51286432021-02-19 09:56:47 -050030 VkResult getSurfaceCapabilities(VkSurfaceCapabilitiesKHR *pSurfaceCapabilities) const override;
Antonio Maioranoc4a1bd42021-01-12 16:37:42 -050031 void attachImage(PresentImage *image) override;
32 void detachImage(PresentImage *image) override;
33 VkResult present(PresentImage *image) override;
34};
35
36} // namespace vk
Sean Risser08762e32021-05-05 14:28:24 -040037#endif // SWIFTSHADER_HEADLESSSURFACEKHR_HPP