blob: 6040a3ae760e0793f82bb516f8dead70c3d3df69 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// 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
|