mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-03 16:16:05 +00:00
Common and VideoCommon: Change texture data from std::vector to Common::UniqueBuffer.
This commit is contained in:
parent
a736d2ed5f
commit
5a80105555
8 changed files with 36 additions and 33 deletions
|
@ -3,9 +3,10 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/Buffer.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "VideoCommon/TextureConfig.h"
|
||||
|
||||
|
@ -18,7 +19,7 @@ public:
|
|||
{
|
||||
struct Level
|
||||
{
|
||||
std::vector<u8> data;
|
||||
Common::UniqueBuffer<u8> data;
|
||||
AbstractTextureFormat format = AbstractTextureFormat::RGBA8;
|
||||
u32 width = 0;
|
||||
u32 height = 0;
|
||||
|
@ -33,5 +34,5 @@ bool LoadDDSTexture(CustomTextureData* texture, const std::string& filename);
|
|||
bool LoadDDSTexture(CustomTextureData::ArraySlice::Level* level, const std::string& filename,
|
||||
u32 mip_level);
|
||||
bool LoadPNGTexture(CustomTextureData::ArraySlice::Level* level, const std::string& filename);
|
||||
bool LoadPNGTexture(CustomTextureData::ArraySlice::Level* level, const std::vector<u8>& buffer);
|
||||
bool LoadPNGTexture(CustomTextureData::ArraySlice::Level* level, std::span<const u8> buffer);
|
||||
} // namespace VideoCommon
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue