1 // 2 // Copyright 2019 The ANGLE Project Authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 // 6 // OverlayVk.h: 7 // Defines the OverlayVk class that does the actual rendering of the overlay. 8 // 9 10 #ifndef LIBANGLE_RENDERER_VULKAN_OVERLAYVK_H_ 11 #define LIBANGLE_RENDERER_VULKAN_OVERLAYVK_H_ 12 13 #include "common/angleutils.h" 14 #include "libANGLE/Overlay.h" 15 #include "libANGLE/renderer/OverlayImpl.h" 16 #include "libANGLE/renderer/vulkan/vk_helpers.h" 17 18 namespace rx 19 { 20 class ContextVk; 21 22 class OverlayVk : public OverlayImpl 23 { 24 public: 25 OverlayVk(const gl::OverlayState &state); 26 ~OverlayVk() override; 27 28 void onDestroy(const gl::Context *context) override; 29 30 angle::Result onPresent(ContextVk *contextVk, 31 vk::ImageHelper *imageToPresent, 32 const vk::ImageView *imageToPresentView, 33 bool is90DegreeRotation); 34 getEnabledWidgetCount()35 uint32_t getEnabledWidgetCount() const { return mState.getEnabledWidgetCount(); } 36 37 private: 38 angle::Result createFont(ContextVk *contextVk); 39 40 vk::ImageHelper mFontImage; 41 vk::ImageView mFontImageView; 42 }; 43 44 } // namespace rx 45 46 #endif // LIBANGLE_RENDERER_VULKAN_OVERLAYVK_H_ 47