Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QOpenGLTextureCache Class Reference

#include <qopengltexturecache_p.h>

+ Inheritance diagram for QOpenGLTextureCache:
+ Collaboration diagram for QOpenGLTextureCache:

Classes

struct  BindResult
 

Public Types

enum class  BindResultFlag : quint8 { NewTexture = 0x01 }
 

Public Member Functions

 QOpenGLTextureCache (QOpenGLContext *)
 
 ~QOpenGLTextureCache ()
 
BindResult bindTexture (QOpenGLContext *context, const QPixmap &pixmap, QOpenGLTextureUploader::BindOptions options=QOpenGLTextureUploader::PremultipliedAlphaBindOption)
 
BindResult bindTexture (QOpenGLContext *context, const QImage &image, QOpenGLTextureUploader::BindOptions options=QOpenGLTextureUploader::PremultipliedAlphaBindOption)
 
void invalidate (qint64 key)
 
void invalidateResource () override
 
void freeResource (QOpenGLContext *ctx) override
 
- Public Member Functions inherited from QOpenGLSharedResource
 QOpenGLSharedResource (QOpenGLContextGroup *group)
 
virtual ~QOpenGLSharedResource ()=0
 
QOpenGLContextGroupgroup () const
 
void free ()
 

Static Public Member Functions

static QOpenGLTextureCachecacheForContext (QOpenGLContext *context)
 

Additional Inherited Members

Detailed Description

Definition at line 30 of file qopengltexturecache_p.h.

Member Enumeration Documentation

◆ BindResultFlag

Enumerator
NewTexture 

Definition at line 38 of file qopengltexturecache_p.h.

Constructor & Destructor Documentation

◆ QOpenGLTextureCache()

QOpenGLTextureCache::QOpenGLTextureCache ( QOpenGLContext * ctx)

Definition at line 74 of file qopengltexturecache.cpp.

◆ ~QOpenGLTextureCache()

QOpenGLTextureCache::~QOpenGLTextureCache ( )

Definition at line 80 of file qopengltexturecache.cpp.

Member Function Documentation

◆ bindTexture() [1/2]

QOpenGLTextureCache::BindResult QOpenGLTextureCache::bindTexture ( QOpenGLContext * context,
const QImage & image,
QOpenGLTextureUploader::BindOptions options = QOpenGLTextureUploader::PremultipliedAlphaBindOption )

Definition at line 109 of file qopengltexturecache.cpp.

References bindTexture(), context, QImagePixmapCleanupHooks::enableCleanupHooks(), QOpenGLFunctions::NPOTTextures, QCache< Key, T >::object(), and QOpenGLTextureUploader::PowerOfTwoBindOption.

+ Here is the call graph for this function:

◆ bindTexture() [2/2]

QOpenGLTextureCache::BindResult QOpenGLTextureCache::bindTexture ( QOpenGLContext * context,
const QPixmap & pixmap,
QOpenGLTextureUploader::BindOptions options = QOpenGLTextureUploader::PremultipliedAlphaBindOption )

Definition at line 84 of file qopengltexturecache.cpp.

References bindTexture(), context, QImagePixmapCleanupHooks::enableCleanupHooks(), QCache< Key, T >::object(), and pixmap.

Referenced by bindTexture(), and bindTexture().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cacheForContext()

QOpenGLTextureCache * QOpenGLTextureCache::cacheForContext ( QOpenGLContext * context)
static

Definition at line 47 of file qopengltexturecache.cpp.

References cacheForContext(), and context.

Referenced by QOpenGL2PaintEngineExPrivate::bindTexture(), QOpenGL2PaintEngineExPrivate::bindTexture(), QOpenGL2PaintEngineExPrivate::bindTexture(), QtWaylandClient::DecorationsBlitter::blit(), and cacheForContext().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ freeResource()

void QOpenGLTextureCache::freeResource ( QOpenGLContext * ctx)
overridevirtual

Implements QOpenGLSharedResource.

Definition at line 171 of file qopengltexturecache.cpp.

References Q_ASSERT.

◆ invalidate()

void QOpenGLTextureCache::invalidate ( qint64 key)

Definition at line 160 of file qopengltexturecache.cpp.

References QCache< Key, T >::remove().

Referenced by QOpenGLTextureCacheWrapper::cleanupTexturesForCacheKey().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ invalidateResource()

void QOpenGLTextureCache::invalidateResource ( )
overridevirtual

Implements QOpenGLSharedResource.

Definition at line 166 of file qopengltexturecache.cpp.

References QCache< Key, T >::clear().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: