mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-16 04:09:39 +00:00
26 lines
568 B
C++
26 lines
568 B
C++
// Copyright 2025 Dolphin Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
#include <unordered_map>
|
|
|
|
#include "VideoCommon/AbstractTexture.h"
|
|
#include "VideoCommon/TextureConfig.h"
|
|
|
|
namespace VideoCommon
|
|
{
|
|
class TexturePool
|
|
{
|
|
public:
|
|
void Reset();
|
|
|
|
std::unique_ptr<AbstractTexture> AllocateTexture(const TextureConfig& config);
|
|
void ReleaseTexture(std::unique_ptr<AbstractTexture> texture);
|
|
|
|
private:
|
|
std::unordered_multimap<TextureConfig, std::unique_ptr<AbstractTexture>> m_cache;
|
|
};
|
|
} // namespace VideoCommon
|