2#include <score_plugin_gfx_export.h>
9#include <unordered_map>
13class QRhiResourceUpdateBatch;
45SCORE_PLUGIN_GFX_EXPORT
46std::optional<DecodedImage> decodeImageFromPath(
const QString& path);
48SCORE_PLUGIN_GFX_EXPORT
49std::optional<DecodedImage> decodeImageFromMemory(
50 const QByteArray& bytes,
const QString& mime_hint);
62SCORE_PLUGIN_GFX_EXPORT
63bool bleedTransparentColor(QImage&
image);
73SCORE_PLUGIN_GFX_EXPORT
74QRhiTexture* uploadImageToTexture(
75 QRhi& rhi, QRhiResourceUpdateBatch& batch,
const QImage& img,
bool srgb,
76 const QString& debug_name = {});
83SCORE_PLUGIN_GFX_EXPORT
84QRhiTexture* loadAndUploadTexture(
85 QRhi& rhi, QRhiResourceUpdateBatch& batch,
const QString& path,
bool srgb);
87SCORE_PLUGIN_GFX_EXPORT
88QRhiTexture* loadAndUploadTexture(
89 QRhi& rhi, QRhiResourceUpdateBatch& batch,
const QByteArray& bytes,
90 const QString& mime_hint,
bool srgb);
116 QRhiTexture* acquireFromPath(
117 QRhi& rhi, QRhiResourceUpdateBatch& batch,
const QString& path,
bool srgb);
121 QRhiTexture* acquireFromMemory(
122 QRhi& rhi, QRhiResourceUpdateBatch& batch,
const QByteArray& bytes,
123 const QString& mime_hint, uint64_t content_hash,
bool srgb);
128 std::size_t size()
const noexcept {
return m_textures.size(); }
135 bool operator==(
const Key&)
const noexcept =
default;
139 std::size_t operator()(
const Key& k)
const noexcept;
142 std::unordered_map<Key, QRhiTexture*, KeyHash> m_textures;
Definition TextureLoader.hpp:104
Graphics rendering pipeline for ossia score.
Definition Filter/PreviewWidget.hpp:11
Definition TextureLoader.hpp:31
Definition Uniforms.hpp:5