// Copyright 2022 Dolphin Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include #include #include #include #include #include #include "VideoCommon/GraphicsModSystem/Runtime/FBInfo.h" #include "VideoCommon/GraphicsModSystem/Runtime/GraphicsModAction.h" #include "VideoCommon/TextureInfo.h" #include "VideoCommon/VideoEvents.h" #include "VideoCommon/XFMemory.h" class GraphicsModGroupConfig; class GraphicsModManager { public: bool Initialize(); const std::vector& GetProjectionActions(ProjectionType projection_type) const; const std::vector& GetProjectionTextureActions(ProjectionType projection_type, const std::string& texture_name) const; const std::vector& GetDrawStartedActions(const std::string& texture_name) const; const std::vector& GetTextureLoadActions(const std::string& texture_name) const; const std::vector& GetTextureCreateActions(const std::string& texture_name) const; const std::vector& GetEFBActions(const FBInfo& efb) const; const std::vector& GetXFBActions(const FBInfo& xfb) const; void Load(const GraphicsModGroupConfig& config); private: void EndOfFrame(); void Reset(); class DecoratedAction; static inline const std::vector m_default = {}; std::list> m_actions; std::unordered_map> m_projection_target_to_actions; std::unordered_map> m_projection_texture_target_to_actions; std::unordered_map> m_draw_started_target_to_actions; std::unordered_map> m_load_texture_target_to_actions; std::unordered_map> m_create_texture_target_to_actions; std::unordered_map, FBInfoHasher> m_efb_target_to_actions; std::unordered_map, FBInfoHasher> m_xfb_target_to_actions; std::unordered_set m_groups; Common::EventHook m_end_of_frame_event; }; extern std::unique_ptr g_graphics_mod_manager;