5#include <private/qopengltextureuploader_p.h>
8#include <private/qimagepixmapcleanuphooks_p.h>
9#include <qpa/qplatformpixmap.h>
11#include <qtopengl_tracepoints_p.h>
86 QOpenGLTextureUploader::BindOptions options)
94 if (!
pixmap.paintingActive()) {
97 context->functions()->glBindTexture(GL_TEXTURE_2D,
entry->id());
98 return {
entry->id(), {} };
111 QOpenGLTextureUploader::BindOptions options)
119 if (!
image.paintingActive()) {
122 context->functions()->glBindTexture(GL_TEXTURE_2D,
entry->id());
123 return {
entry->id(), {} };
144 QOpenGLTextureUploader::BindOptions options)
150 funcs->glGenTextures(1, &
id);
151 funcs->glBindTexture(GL_TEXTURE_2D,
id);
178 funcs->glDeleteTextures(1, &
id);
bool remove(const Key &key) noexcept(std::is_nothrow_destructible_v< Node >)
T * object(const Key &key) const noexcept
void clear() noexcept(std::is_nothrow_destructible_v< Node >)
bool insert(const Key &key, T *object, qsizetype cost=1)
void addPlatformPixmapModificationHook(_qt_pixmap_cleanup_hook_pmd)
void removeImageHook(_qt_image_cleanup_hook_64)
void removePlatformPixmapDestructionHook(_qt_pixmap_cleanup_hook_pmd)
void addPlatformPixmapDestructionHook(_qt_pixmap_cleanup_hook_pmd)
void addImageHook(_qt_image_cleanup_hook_64)
void removePlatformPixmapModificationHook(_qt_pixmap_cleanup_hook_pmd)
static QImagePixmapCleanupHooks * instance()
static void enableCleanupHooks(const QImage &image)
QOpenGLCachedTexture(GLuint id, QOpenGLTextureUploader::BindOptions options, QOpenGLContext *context)
The QOpenGLFunctions class provides cross-platform access to the OpenGL ES 2.0 API.
The QOpenGLMultiGroupSharedResource keeps track of a shared resource that might be needed from multip...
QOpenGLSharedResource * value(QOpenGLContext *context)
The QOpenGLSharedResourceGuard class is a convenience sub-class of QOpenGLSharedResource to be used t...
The QOpenGLSharedResource class is used to keep track of resources that are shared between OpenGL con...
static void cleanupTexturesForPixmapData(QPlatformPixmap *pmd)
~QOpenGLTextureCacheWrapper()
QOpenGLTextureCache * cacheForContext(QOpenGLContext *context)
QOpenGLTextureCacheWrapper()
static void cleanupTexturesForCacheKey(qint64 key)
void freeResource(QOpenGLContext *ctx) override
void invalidate(qint64 key)
QOpenGLTextureCache(QOpenGLContext *)
void invalidateResource() override
BindResult bindTexture(QOpenGLContext *context, const QPixmap &pixmap, QOpenGLTextureUploader::BindOptions options=QOpenGLTextureUploader::PremultipliedAlphaBindOption)
static QOpenGLTextureCache * cacheForContext(QOpenGLContext *context)
static qsizetype textureImage(GLenum target, const QImage &image, BindOptions options, QSize maxSize=QSize())
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
static VulkanServerBufferGlFunctions * funcs
QSet< QString >::iterator it
Combined button and popup list for selecting options.
SharedPointerFileDialogOptions m_options
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
static void freeTexture(QOpenGLFunctions *funcs, GLuint id)
static quint64 cacheSize()
static qsizetype cost(const QPixmap &pixmap)
Q_CORE_EXPORT int qEnvironmentVariableIntValue(const char *varName, bool *ok=nullptr) noexcept
#define Q_TRACE_SCOPE(x,...)
#define Q_TRACE_POINT(provider, tracepoint,...)
unsigned long long quint64