Krita Source Code Documentation
Loading...
Searching...
No Matches
KisOpenGLImageTextures Class Reference

#include <kis_opengl_image_textures.h>

+ Inheritance diagram for KisOpenGLImageTextures:

Signals

void sigShowFloatingMessage (const QString &message, int timeout, bool priority)
 

Public Member Functions

GLuint checkerTexture ()
 
void generateCheckerTexture (const QImage &checkImage)
 
int getTextureBufferIndexCR (int col, int row)
 
KisTextureTilegetTextureTileCR (int col, int row)
 
KisImageSP image () const
 
void initGL (QOpenGLFunctions *f)
 
bool internalColorManagementActive () const
 
 KisOpenGLImageTextures ()
 
const KoColorProfilemonitorProfile ()
 
void recalculateCache (KisUpdateInfoSP info, bool blockMipmapRegeneration)
 
void setChannelFlags (const QBitArray &channelFlags)
 
bool setImageColorSpace (const KoColorSpace *cs)
 
bool setInternalColorManagementActive (bool value)
 
void setMonitorProfile (const KoColorProfile *monitorProfile, KoColorConversionTransformation::Intent renderingIntent, KoColorConversionTransformation::ConversionFlags conversionFlags)
 
void setProofingConfig (KisProofingConfigurationSP)
 
void slotImageSizeChanged (qint32 w, qint32 h)
 
QRect storedImageBounds ()
 
void testingForceInitialized ()
 
qreal texelSize () const
 
QOpenGLBuffer * tileTexCoordBuffer ()
 
QOpenGLBuffer * tileVertexBuffer ()
 
KisOpenGLUpdateInfoSP updateCache (const QRect &rect, KisImageSP srcImage)
 
KisOpenGLUpdateInfoSP updateCacheNoConversion (const QRect &rect)
 
void updateConfig (bool useBuffer, int NumMipmapLevels)
 
KisOpenGLUpdateInfoBuilderupdateInfoBuilder ()
 
int xToCol (int x)
 
int yToRow (int y)
 
virtual ~KisOpenGLImageTextures ()
 
- Public Member Functions inherited from KisShared
bool deref ()
 
bool ref ()
 
int refCount ()
 
QAtomicInt * sharedWeakReference ()
 

Static Public Member Functions

static KisOpenGLImageTexturesSP createImageTextures (KisImageWSP image, const KoColorProfile *monitorProfile, KoColorConversionTransformation::Intent renderingIntent, KoColorConversionTransformation::ConversionFlags conversionFlags)
 

Static Public Attributes

static const int BACKGROUND_TEXTURE_CHECK_SIZE = 32
 
static const int BACKGROUND_TEXTURE_SIZE = BACKGROUND_TEXTURE_CHECK_SIZE * 2
 

Protected Member Functions

void destroyImageTextureTiles ()
 
void initBufferStorage (bool useBuffer)
 
 KisOpenGLImageTextures (KisImageWSP image, const KoColorProfile *monitorProfile, KoColorConversionTransformation::Intent renderingIntent, KoColorConversionTransformation::ConversionFlags conversionFlags)
 
void recreateImageTextureTiles ()
 
- Protected Member Functions inherited from KisShared
 KisShared ()
 
 ~KisShared ()
 

Private Member Functions

void getTextureSize (KisGLTexturesInfo *texturesInfo)
 
KisOpenGLUpdateInfoSP updateCacheImpl (const QRect &rect, KisImageSP srcImage, bool convertColorSpace)
 
void updateTextureFormat ()
 

Private Attributes

KisOpenGLBufferCircularStorage m_bufferStorage
 
boost::optional< GLuint > m_checkerTexture
 
KoColorConversionTransformation::ConversionFlags m_conversionFlags
 
QOpenGLFunctions * m_glFuncs {nullptr}
 
KisImageWSP m_image
 
bool m_initialized {false}
 
bool m_internalColorManagementActive {true}
 
const KoColorProfilem_monitorProfile {nullptr}
 
int m_numCols {0}
 
KoColorConversionTransformation::Intent m_renderingIntent
 
QRect m_storedImageBounds
 
KisGLTexturesInfo m_texturesInfo
 
QVector< KisTextureTile * > m_textureTiles
 
QOpenGLBuffer m_tileTexCoordBuffer
 
QOpenGLBuffer m_tileVertexBuffer
 
KisOpenGLUpdateInfoBuilder m_updateInfoBuilder
 
bool m_useOcio {false}
 

Detailed Description

A set of OpenGL textures that contains the projection of a KisImage.

Definition at line 36 of file kis_opengl_image_textures.h.

Constructor & Destructor Documentation

◆ KisOpenGLImageTextures() [1/2]

KisOpenGLImageTextures::KisOpenGLImageTextures ( )

Default constructor.

Definition at line 71 of file kis_opengl_image_textures.cpp.

72 : m_image(0)
75 , m_bufferStorage(QOpenGLBuffer::PixelUnpackBuffer)
76 , m_glFuncs(0)
77 , m_useOcio(false)
78 , m_initialized(false)
79{
80 KisConfig cfg(true);
82
85 if (!cfg.allowLCMSOptimization()) m_conversionFlags |= KoColorConversionTransformation::NoOptimization;
86 m_useOcio = cfg.useOcio();
87}
KisOpenGLBufferCircularStorage m_bufferStorage
KoColorConversionTransformation::ConversionFlags m_conversionFlags
KoColorConversionTransformation::Intent m_renderingIntent
const KoColorProfile * m_monitorProfile

References KisConfig::allowLCMSOptimization(), KoColorConversionTransformation::BlackpointCompensation, KoColorConversionTransformation::HighQuality, m_conversionFlags, m_renderingIntent, m_useOcio, KisConfig::monitorRenderIntent(), KoColorConversionTransformation::NoOptimization, KisConfig::useBlackPointCompensation(), and KisConfig::useOcio().

◆ ~KisOpenGLImageTextures()

KisOpenGLImageTextures::~KisOpenGLImageTextures ( )
virtual

Destructor.

Definition at line 129 of file kis_opengl_image_textures.cpp.

130{
132 if (m_checkerTexture) {
133 m_glFuncs->glDeleteTextures(1, &(*m_checkerTexture));
134 }
135}
boost::optional< GLuint > m_checkerTexture

References destroyImageTextureTiles(), m_checkerTexture, and m_glFuncs.

◆ KisOpenGLImageTextures() [2/2]

KisOpenGLImageTextures::KisOpenGLImageTextures ( KisImageWSP image,
const KoColorProfile * monitorProfile,
KoColorConversionTransformation::Intent renderingIntent,
KoColorConversionTransformation::ConversionFlags conversionFlags )
protected

Definition at line 89 of file kis_opengl_image_textures.cpp.

93 : m_image(image)
95 , m_renderingIntent(renderingIntent)
96 , m_conversionFlags(conversionFlags)
98 , m_bufferStorage(QOpenGLBuffer::PixelUnpackBuffer)
99 , m_glFuncs(0)
100 , m_useOcio(false)
101 , m_initialized(false)
102{
103 Q_ASSERT(renderingIntent < 4);
104}
const KoColorProfile * monitorProfile()

Member Function Documentation

◆ checkerTexture()

GLuint KisOpenGLImageTextures::checkerTexture ( )

Definition at line 393 of file kis_opengl_image_textures.cpp.

394{
395 if (m_glFuncs) {
396 if (!m_checkerTexture) {
397 m_checkerTexture = GLuint();
398 m_glFuncs->glGenTextures(1, &(*m_checkerTexture));
399 }
400 return *m_checkerTexture;
401 }
402 else {
403 dbgUI << "Tried to access checker texture before OpenGL was initialized";
404 return 0;
405 }
406}
#define dbgUI
Definition kis_debug.h:52

References dbgUI, m_checkerTexture, and m_glFuncs.

◆ createImageTextures()

KisOpenGLImageTexturesSP KisOpenGLImageTextures::createImageTextures ( KisImageWSP image,
const KoColorProfile * monitorProfile,
KoColorConversionTransformation::Intent renderingIntent,
KoColorConversionTransformation::ConversionFlags conversionFlags )
static

Obtain a KisOpenGLImageTextures object for the given image.

Parameters
imageThe image
monitorProfileThe profile of the display device
renderingIntentThe rendering intent
conversionFlagsThe color conversion flags

Definition at line 158 of file kis_opengl_image_textures.cpp.

162{
163 return new KisOpenGLImageTextures(image, monitorProfile, renderingIntent, conversionFlags);
164}

References image(), KisOpenGLImageTextures(), and monitorProfile().

◆ destroyImageTextureTiles()

void KisOpenGLImageTextures::destroyImageTextureTiles ( )
protected

Definition at line 261 of file kis_opengl_image_textures.cpp.

262{
263 if (m_textureTiles.isEmpty()) return;
264
265 Q_FOREACH (KisTextureTile *tile, m_textureTiles) {
266 delete tile;
267 }
268 m_textureTiles.clear();
269 m_tileVertexBuffer.destroy();
270 m_tileTexCoordBuffer.destroy();
271 m_storedImageBounds = QRect();
272}
QVector< KisTextureTile * > m_textureTiles

References m_storedImageBounds, m_textureTiles, m_tileTexCoordBuffer, and m_tileVertexBuffer.

◆ generateCheckerTexture()

void KisOpenGLImageTextures::generateCheckerTexture ( const QImage & checkImage)

Generate a background texture from the given QImage. This is used for the checker pattern on which the image is rendered.

Definition at line 338 of file kis_opengl_image_textures.cpp.

339{
340 if (!m_initialized) {
341 return;
342 }
343
344 QOpenGLContext *ctx = QOpenGLContext::currentContext();
345 if (ctx) {
346 QOpenGLFunctions *f = ctx->functions();
347 dbgUI << "Attaching checker texture" << checkerTexture();
348 f->glBindTexture(GL_TEXTURE_2D, checkerTexture());
349
350 f->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
351 f->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
352 f->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
353 f->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
354
355 f->glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
356
357 QImage img = checkImage;
358 if (checkImage.width() != BACKGROUND_TEXTURE_SIZE || checkImage.height() != BACKGROUND_TEXTURE_SIZE) {
359 img = checkImage.scaled(BACKGROUND_TEXTURE_SIZE, BACKGROUND_TEXTURE_SIZE);
360 }
361
362 // convert from sRGB to display format, potentially HDR
363 const KoColorSpace *temporaryColorSpace = KoColorSpaceRegistry::instance()->rgb8();
364 const KoColorSpace *finalColorSpace =
368
369 KisFixedPaintDevice checkers(temporaryColorSpace);
370 checkers.convertFromQImage(img, temporaryColorSpace->profile()->name());
371 checkers.convertTo(finalColorSpace);
372
373 KIS_ASSERT(checkers.bounds().width() == BACKGROUND_TEXTURE_SIZE);
374 KIS_ASSERT(checkers.bounds().height() == BACKGROUND_TEXTURE_SIZE);
375
376 GLint format = m_texturesInfo.format;
377 GLint internalFormat = m_texturesInfo.internalFormat;
378 GLint type = m_texturesInfo.type;
379
380 f->glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, BACKGROUND_TEXTURE_SIZE, BACKGROUND_TEXTURE_SIZE,
381 0, format, type, checkers.data());
382
383 // QPainter::drawText relies on this.
384 // Ref: https://bugreports.qt.io/browse/QTBUG-65496
385 f->glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
386 }
387 else {
388 dbgUI << "OpenGL: Tried to generate checker texture before OpenGL was initialized.";
389 }
390
391}
const KoID RGBAColorModelID("RGBA", ki18n("RGB/Alpha"))
KisOpenGLUpdateInfoBuilder m_updateInfoBuilder
virtual KoID colorDepthId() const =0
virtual const KoColorProfile * profile() const =0
QString id() const
Definition KoID.cpp:63
#define KIS_ASSERT(cond)
Definition kis_assert.h:33
const KoColorSpace * destinationColorSpace() const
const KoColorSpace * colorSpace(const QString &colorModelId, const QString &colorDepthId, const KoColorProfile *profile)
static KoColorSpaceRegistry * instance()
const KoColorSpace * rgb8(const QString &profileName=QString())

References BACKGROUND_TEXTURE_SIZE, KisFixedPaintDevice::bounds(), checkerTexture(), KoColorSpace::colorDepthId(), KoColorSpaceRegistry::colorSpace(), KisFixedPaintDevice::convertFromQImage(), KisFixedPaintDevice::convertTo(), KisFixedPaintDevice::data(), dbgUI, KisOpenGLUpdateInfoBuilder::destinationColorSpace(), KisGLTexturesInfo::format, KoID::id(), KoColorSpaceRegistry::instance(), KisGLTexturesInfo::internalFormat, KIS_ASSERT, m_initialized, m_monitorProfile, m_texturesInfo, m_updateInfoBuilder, KoColorProfile::name, KoColorSpace::profile(), KoColorSpaceRegistry::rgb8(), RGBAColorModelID, and KisGLTexturesInfo::type.

◆ getTextureBufferIndexCR()

int KisOpenGLImageTextures::getTextureBufferIndexCR ( int col,
int row )
inline

Definition at line 133 of file kis_opengl_image_textures.h.

133 {
134 if (m_initialized) {
135 int tile = row * m_numCols + col;
137 return tile;
138 }
139 return -1;
140 }
#define KIS_ASSERT_RECOVER_RETURN_VALUE(cond, val)
Definition kis_assert.h:85

References KIS_ASSERT_RECOVER_RETURN_VALUE.

◆ getTextureSize()

void KisOpenGLImageTextures::getTextureSize ( KisGLTexturesInfo * texturesInfo)
private

Definition at line 506 of file kis_opengl_image_textures.cpp.

507{
508 KisConfig cfg(true);
509
510 const GLint preferredTextureSize = cfg.openGLTextureSize();
511
512 GLint maxTextureSize;
513 if (m_glFuncs) {
514 m_glFuncs->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTextureSize);
515 }
516 else {
517 dbgUI << "OpenGL: Tried to read texture size before OpenGL was initialized.";
518 maxTextureSize = GL_MAX_TEXTURE_SIZE;
519 }
520
521 texturesInfo->width = qMin(preferredTextureSize, maxTextureSize);
522 texturesInfo->height = qMin(preferredTextureSize, maxTextureSize);
523
524 texturesInfo->border = cfg.textureOverlapBorder();
525
526 texturesInfo->effectiveWidth = texturesInfo->width - 2 * texturesInfo->border;
527 texturesInfo->effectiveHeight = texturesInfo->height - 2 * texturesInfo->border;
528
531 QSize(texturesInfo->effectiveWidth, texturesInfo->effectiveHeight));
532}
void setEffectiveTextureSize(const QSize &size)

References KisGLTexturesInfo::border, dbgUI, KisGLTexturesInfo::effectiveHeight, KisGLTexturesInfo::effectiveWidth, KisGLTexturesInfo::height, m_glFuncs, m_updateInfoBuilder, KisConfig::openGLTextureSize(), KisOpenGLUpdateInfoBuilder::setEffectiveTextureSize(), KisOpenGLUpdateInfoBuilder::setTextureBorder(), KisConfig::textureOverlapBorder(), and KisGLTexturesInfo::width.

◆ getTextureTileCR()

KisTextureTile * KisOpenGLImageTextures::getTextureTileCR ( int col,
int row )
inline

Definition at line 124 of file kis_opengl_image_textures.h.

124 {
125 if (m_initialized) {
126 int tile = row * m_numCols + col;
128 return m_textureTiles[tile];
129 }
130 return 0;
131 }

References KIS_ASSERT_RECOVER_RETURN_VALUE.

◆ image()

KisImageSP KisOpenGLImageTextures::image ( ) const
Returns
the image associated with the textures

Definition at line 137 of file kis_opengl_image_textures.cpp.

138{
139 return m_image;
140}

References m_image.

◆ initBufferStorage()

void KisOpenGLImageTextures::initBufferStorage ( bool useBuffer)
protected

Definition at line 142 of file kis_opengl_image_textures.cpp.

143{
144 if (useBuffer) {
145 const int numTextureBuffers = 16;
146
147 const KoColorSpace *tilesDestinationColorSpace =
149 const int pixelSize = tilesDestinationColorSpace->pixelSize();
150 const int tileSize = m_texturesInfo.width * m_texturesInfo.height * pixelSize;
151
152 m_bufferStorage.allocate(numTextureBuffers, tileSize);
153 } else {
155 }
156}
virtual quint32 pixelSize() const =0
void allocate(int numBuffers, int bufferSize)

References KisOpenGLBufferCircularStorage::allocate(), KisOpenGLUpdateInfoBuilder::destinationColorSpace(), KisGLTexturesInfo::height, m_bufferStorage, m_texturesInfo, m_updateInfoBuilder, KoColorSpace::pixelSize(), KisOpenGLBufferCircularStorage::reset(), and KisGLTexturesInfo::width.

◆ initGL()

void KisOpenGLImageTextures::initGL ( QOpenGLFunctions * f)

Complete initialization can only happen once an OpenGL context has been created.

Parameters
fPointer to OpenGL functions. They must already be initialized.

Definition at line 106 of file kis_opengl_image_textures.cpp.

107{
108 if (f) {
109 m_glFuncs = f;
110 } else {
111 errUI << "Tried to create OpenGLImageTextures with uninitialized QOpenGLFunctions";
112 }
113
115
116 // we use local static object for creating pools shared among
117 // different images
118 static KisTextureTileInfoPoolRegistry s_poolRegistry;
120
121 m_checkerTexture = GLuint();
122 m_glFuncs->glGenTextures(1, &(*m_checkerTexture));
124
126 recalculateCache(info, false);
127}
QRect bounds() const override
KisOpenGLUpdateInfoSP updateCache(const QRect &rect, KisImageSP srcImage)
void recalculateCache(KisUpdateInfoSP info, bool blockMipmapRegeneration)
void getTextureSize(KisGLTexturesInfo *texturesInfo)
KisTextureTileInfoPoolSP getPool(int tileWidth, int tileHeight)
#define errUI
Definition kis_debug.h:114
void setTextureInfoPool(KisTextureTileInfoPoolSP pool)

References KisImage::bounds(), errUI, KisTextureTileInfoPoolRegistry::getPool(), getTextureSize(), KisGLTexturesInfo::height, m_checkerTexture, m_glFuncs, m_image, m_texturesInfo, m_updateInfoBuilder, recalculateCache(), recreateImageTextureTiles(), KisOpenGLUpdateInfoBuilder::setTextureInfoPool(), updateCache(), and KisGLTexturesInfo::width.

◆ internalColorManagementActive()

bool KisOpenGLImageTextures::internalColorManagementActive ( ) const

Definition at line 534 of file kis_opengl_image_textures.cpp.

535{
537}

References m_internalColorManagementActive.

◆ monitorProfile()

const KoColorProfile * KisOpenGLImageTextures::monitorProfile ( )

Definition at line 447 of file kis_opengl_image_textures.cpp.

448{
449 return m_monitorProfile;
450}

References m_monitorProfile.

◆ recalculateCache()

void KisOpenGLImageTextures::recalculateCache ( KisUpdateInfoSP info,
bool blockMipmapRegeneration )

Definition at line 291 of file kis_opengl_image_textures.cpp.

292{
293 if (!m_initialized) {
294 dbgUI << "OpenGL: Tried to edit image texture cache before it was initialized.";
295 return;
296 }
297
298 KisOpenGLUpdateInfoSP glInfo = dynamic_cast<KisOpenGLUpdateInfo*>(info.data());
299 if(!glInfo) return;
300
301 QScopedPointer<KisOpenGLSync> sync;
302 int numProcessedTiles = 0;
303
305 Q_FOREACH (tileInfo, glInfo->tileList) {
306 KisTextureTile *tile = getTextureTileCR(tileInfo->tileCol(), tileInfo->tileRow());
308
309 if (m_bufferStorage.isValid() && numProcessedTiles > m_bufferStorage.size() &&
310 sync && !sync->isSignaled()) {
311
312#ifdef DEBUG_BUFFER_REALLOCATION
313 qDebug() << "Still unsignalled after processed" << numProcessedTiles << "tiles";
314#endif
315
317
318#ifdef DEBUG_BUFFER_REALLOCATION
319 qDebug() << " increased number of buffers to" << m_bufferStorage.size();
320#endif
321 }
322
323
324 tile->update(*tileInfo, blockMipmapRegeneration);
325
326 if (m_bufferStorage.isValid()) {
327 if (!sync) {
328 sync.reset(new KisOpenGLSync());
329 numProcessedTiles = 0;
330 } else if (sync && sync->isSignaled()) {
331 sync.reset();
332 }
333 numProcessedTiles++;
334 }
335 }
336}
KisTextureTile * getTextureTileCR(int col, int row)
KisTextureTileUpdateInfoSPList tileList
void update(const KisTextureTileUpdateInfo &updateInfo, bool blockMipmapRegeneration)
#define KIS_ASSERT_RECOVER_RETURN(cond)
Definition kis_assert.h:75

References KisOpenGLBufferCircularStorage::allocateMoreBuffers(), KisSharedPtr< T >::data(), dbgUI, getTextureTileCR(), KisOpenGLBufferCircularStorage::isValid(), KIS_ASSERT_RECOVER_RETURN, m_bufferStorage, m_initialized, KisOpenGLBufferCircularStorage::size(), KisOpenGLUpdateInfo::tileList, and KisTextureTile::update().

◆ recreateImageTextureTiles()

void KisOpenGLImageTextures::recreateImageTextureTiles ( )
protected

Definition at line 166 of file kis_opengl_image_textures.cpp.

167{
168
171
172 const KoColorSpace *tilesDestinationColorSpace =
174
175 if (!tilesDestinationColorSpace) {
176 qDebug() << "No destination colorspace!!!!";
177 return;
178 }
179
180
182 const int lastCol = xToCol(m_image->width());
183 const int lastRow = yToRow(m_image->height());
184
185 m_numCols = lastCol + 1;
186
187 // Default color is transparent black
188 const int pixelSize = tilesDestinationColorSpace->pixelSize();
189 QByteArray emptyTileData((m_texturesInfo.width) * (m_texturesInfo.height) * pixelSize, 0);
190
191 KisConfig config(true);
192 KisOpenGL::FilterMode mode = (KisOpenGL::FilterMode)config.openGLFilteringMode();
193
194 initBufferStorage(KisOpenGL::shouldUseTextureBuffers(config.useOpenGLTextureBuffer()));
195
196 QOpenGLContext *ctx = QOpenGLContext::currentContext();
197 if (ctx) {
198 QOpenGLFunctions *f = ctx->functions();
199
200 m_initialized = true;
201 dbgUI << "OpenGL: creating texture tiles of size" << m_texturesInfo.height << "x" << m_texturesInfo.width;
202
203 QVector<QRectF> tileImageRect;
204 QVector<QRectF> tileTextureRect;
205
206 m_textureTiles.reserve((lastRow+1)*m_numCols);
207
208 tileImageRect.reserve(m_textureTiles.size());
209 tileTextureRect.reserve(m_textureTiles.size());
210
211 for (int row = 0; row <= lastRow; row++) {
212 for (int col = 0; col <= lastCol; col++) {
213 QRect tileRect = m_updateInfoBuilder.calculateEffectiveTileRect(col, row, m_image->bounds());
214
215 KisTextureTile *tile = new KisTextureTile(tileRect,
217 emptyTileData,
218 mode,
220 config.numMipmapLevels(),
221 f);
222 m_textureTiles.append(tile);
223 tileImageRect.append(tile->tileRectInImagePixels());
224 tileTextureRect.append(tile->tileRectInTexturePixels());
225 }
226 }
227
228
229
230 {
232 tileImageRect.size() * 6 * 3 * sizeof(float),
233 QOpenGLBuffer::StaticDraw);
234
235 QVector3D* mappedPtr = reinterpret_cast<QVector3D*>(bufferGuard.data());
236
237 Q_FOREACH (const QRectF &rc, tileImageRect) {
239 mappedPtr += 6;
240 }
241 }
242
243 {
245 tileImageRect.size() * 6 * 2 * sizeof(float),
246 QOpenGLBuffer::StaticDraw);
247
248 QVector2D* mappedPtr = reinterpret_cast<QVector2D*>(bufferGuard.data());
249
250 Q_FOREACH (const QRectF &rc, tileTextureRect) {
252 mappedPtr += 6;
253 }
254 }
255 }
256 else {
257 dbgUI << "Tried to init texture tiles without a current OpenGL Context.";
258 }
259}
qint32 width() const
qint32 height() const
static bool shouldUseTextureBuffers(bool userPreference)
QRect tileRectInImagePixels()
QRectF tileRectInTexturePixels()
void rectToTexCoords(QVector2D *texCoords, const QRectF &rc)
void rectToVertices(QVector3D *vertices, const QRectF &rc)
QRect calculateEffectiveTileRect(int col, int row, const QRect &imageBounds) const

References KisImage::bounds(), KisOpenGLUpdateInfoBuilder::calculateEffectiveTileRect(), KisOpenGLBufferCreationGuard::data(), dbgUI, KisOpenGLUpdateInfoBuilder::destinationColorSpace(), destroyImageTextureTiles(), KisImage::height(), KisGLTexturesInfo::height, initBufferStorage(), KisOpenGLBufferCircularStorage::isValid(), m_bufferStorage, m_image, m_initialized, m_numCols, m_storedImageBounds, m_texturesInfo, m_textureTiles, m_tileTexCoordBuffer, m_tileVertexBuffer, m_updateInfoBuilder, KisConfig::numMipmapLevels(), KisConfig::openGLFilteringMode(), KoColorSpace::pixelSize(), KisPaintingTweaks::rectToTexCoords(), KisPaintingTweaks::rectToVertices(), KisOpenGL::shouldUseTextureBuffers(), KisTextureTile::tileRectInImagePixels(), KisTextureTile::tileRectInTexturePixels(), updateTextureFormat(), KisConfig::useOpenGLTextureBuffer(), KisImage::width(), KisGLTexturesInfo::width, xToCol(), and yToRow().

◆ setChannelFlags()

void KisOpenGLImageTextures::setChannelFlags ( const QBitArray & channelFlags)

Definition at line 471 of file kis_opengl_image_textures.cpp.

472{
473 QBitArray targetChannelFlags = channelFlags;
474 int selectedChannels = 0;
475 const KoColorSpace *projectionCs = m_image->projection()->colorSpace();
476 const QList<KoChannelInfo*> channelInfo = projectionCs->channels();
477
478 if (targetChannelFlags.size() != channelInfo.size()) {
479 targetChannelFlags = QBitArray();
480 }
481
482 int selectedChannelIndex = -1;
483
484 for (int i = 0; i < targetChannelFlags.size(); ++i) {
485 if (targetChannelFlags.testBit(i) && channelInfo[i]->channelType() == KoChannelInfo::COLOR) {
486 selectedChannels++;
487 selectedChannelIndex = i;
488 }
489 }
490 const bool allChannelsSelected = (selectedChannels == targetChannelFlags.size());
491 const bool onlyOneChannelSelected = (selectedChannels == 1);
492
493 // OCIO has its own channel swizzling
494 if (allChannelsSelected || m_useOcio) {
495 m_updateInfoBuilder.setChannelFlags(QBitArray(), false, -1);
496 } else {
497 m_updateInfoBuilder.setChannelFlags(targetChannelFlags, onlyOneChannelSelected, selectedChannelIndex);
498 }
499}
KisPaintDeviceSP projection() const
const KoColorSpace * colorSpace() const
@ COLOR
The channel represents a color.
QList< KoChannelInfo * > channels
void setChannelFlags(const QBitArray &channelFrags, bool onlyOneChannelSelected, int selectedChannelIndex)

References KoColorSpace::channels, KoChannelInfo::COLOR, KisPaintDevice::colorSpace(), m_image, m_updateInfoBuilder, m_useOcio, KisImage::projection(), and KisOpenGLUpdateInfoBuilder::setChannelFlags().

◆ setImageColorSpace()

bool KisOpenGLImageTextures::setImageColorSpace ( const KoColorSpace * cs)

Update the textures when the color space of the image changes.

Returns
true when a full data refetch should be initiated by the caller

Definition at line 462 of file kis_opengl_image_textures.cpp.

463{
464 Q_UNUSED(cs);
465 // TODO: implement lazy update: do not re-upload textures when not needed
466
468 return true;
469}

References recreateImageTextureTiles().

◆ setInternalColorManagementActive()

bool KisOpenGLImageTextures::setInternalColorManagementActive ( bool value)

Definition at line 539 of file kis_opengl_image_textures.cpp.

540{
541 bool needsFinalRegeneration = m_internalColorManagementActive != value;
542
543 if (needsFinalRegeneration) {
546
547 // at this point the value of m_internalColorManagementActive might
548 // have been forcefully reverted to 'false' in case of some problems
549 }
550
551 return needsFinalRegeneration;
552}
float value(const T *src, size_t ch)

References m_internalColorManagementActive, recreateImageTextureTiles(), and value().

◆ setMonitorProfile()

void KisOpenGLImageTextures::setMonitorProfile ( const KoColorProfile * monitorProfile,
KoColorConversionTransformation::Intent renderingIntent,
KoColorConversionTransformation::ConversionFlags conversionFlags )

Set the color profile of the display device.

Parameters
monitorProfileThe color profile of the display device
renderingIntentThe rendering intent
conversionFlagsThe color conversion flags

Definition at line 452 of file kis_opengl_image_textures.cpp.

453{
454 //dbgUI << "Setting monitor profile to" << monitorProfile->name() << renderingIntent << conversionFlags;
456 m_renderingIntent = renderingIntent;
457 m_conversionFlags = conversionFlags;
458
460}

References m_conversionFlags, m_monitorProfile, m_renderingIntent, monitorProfile(), and recreateImageTextureTiles().

◆ setProofingConfig()

void KisOpenGLImageTextures::setProofingConfig ( KisProofingConfigurationSP proofingConfig)

Definition at line 501 of file kis_opengl_image_textures.cpp.

502{
504}
void setProofingConfig(KisProofingConfigurationSP config)

References m_updateInfoBuilder, and KisOpenGLUpdateInfoBuilder::setProofingConfig().

◆ sigShowFloatingMessage

void KisOpenGLImageTextures::sigShowFloatingMessage ( const QString & message,
int timeout,
bool priority )
signal

◆ slotImageSizeChanged()

void KisOpenGLImageTextures::slotImageSizeChanged ( qint32 w,
qint32 h )

Definition at line 437 of file kis_opengl_image_textures.cpp.

438{
440}

References recreateImageTextureTiles().

◆ storedImageBounds()

QRect KisOpenGLImageTextures::storedImageBounds ( )
inline

Definition at line 112 of file kis_opengl_image_textures.h.

112 {
113 return m_storedImageBounds;
114 }

◆ testingForceInitialized()

void KisOpenGLImageTextures::testingForceInitialized ( )

Definition at line 421 of file kis_opengl_image_textures.cpp.

422{
423 m_initialized = true;
425
426 ConversionOptions options;
430 options.m_needsConversion = false;
432
435}
QSharedPointer< T > toQShared(T *ptr)
KoColorConversionTransformation::ConversionFlags m_conversionFlags
const KoColorSpace * m_destinationColorSpace
KoColorConversionTransformation::Intent m_renderingIntent
void setConversionOptions(const ConversionOptions &options)

References KoColorSpaceRegistry::instance(), KoColorConversionTransformation::internalConversionFlags(), KoColorConversionTransformation::internalRenderingIntent(), ConversionOptions::m_conversionFlags, ConversionOptions::m_destinationColorSpace, m_initialized, ConversionOptions::m_needsConversion, ConversionOptions::m_renderingIntent, m_updateInfoBuilder, KoColorSpaceRegistry::rgb8(), KisOpenGLUpdateInfoBuilder::setConversionOptions(), KisOpenGLUpdateInfoBuilder::setEffectiveTextureSize(), KisOpenGLUpdateInfoBuilder::setTextureBorder(), KisOpenGLUpdateInfoBuilder::setTextureInfoPool(), and toQShared().

◆ texelSize()

qreal KisOpenGLImageTextures::texelSize ( ) const
inline

Definition at line 150 of file kis_opengl_image_textures.h.

150 {
152 return 1.0 / m_texturesInfo.width;
153 }

◆ tileTexCoordBuffer()

QOpenGLBuffer * KisOpenGLImageTextures::tileTexCoordBuffer ( )
inline

Definition at line 146 of file kis_opengl_image_textures.h.

146 {
147 return &m_tileTexCoordBuffer;
148 }

◆ tileVertexBuffer()

QOpenGLBuffer * KisOpenGLImageTextures::tileVertexBuffer ( )
inline

Definition at line 142 of file kis_opengl_image_textures.h.

142 {
143 return &m_tileVertexBuffer;
144 }

◆ updateCache()

KisOpenGLUpdateInfoSP KisOpenGLImageTextures::updateCache ( const QRect & rect,
KisImageSP srcImage )

Definition at line 274 of file kis_opengl_image_textures.cpp.

275{
276 return updateCacheImpl(rect, srcImage, true);
277}
KisOpenGLUpdateInfoSP updateCacheImpl(const QRect &rect, KisImageSP srcImage, bool convertColorSpace)

References updateCacheImpl().

◆ updateCacheImpl()

KisOpenGLUpdateInfoSP KisOpenGLImageTextures::updateCacheImpl ( const QRect & rect,
KisImageSP srcImage,
bool convertColorSpace )
private

Definition at line 285 of file kis_opengl_image_textures.cpp.

286{
287 if (!m_initialized) return new KisOpenGLUpdateInfo();
288 return m_updateInfoBuilder.buildUpdateInfo(rect, srcImage, convertColorSpace);
289}
KisOpenGLUpdateInfoSP buildUpdateInfo(const QRect &rect, KisImageSP srcImage, bool convertColorSpace)

References KisOpenGLUpdateInfoBuilder::buildUpdateInfo(), m_initialized, and m_updateInfoBuilder.

◆ updateCacheNoConversion()

KisOpenGLUpdateInfoSP KisOpenGLImageTextures::updateCacheNoConversion ( const QRect & rect)

Definition at line 279 of file kis_opengl_image_textures.cpp.

280{
281 return updateCacheImpl(rect, m_image, false);
282}

References m_image, and updateCacheImpl().

◆ updateConfig()

void KisOpenGLImageTextures::updateConfig ( bool useBuffer,
int NumMipmapLevels )

Definition at line 408 of file kis_opengl_image_textures.cpp.

409{
410 if(m_textureTiles.isEmpty()) return;
411
412 const bool effectiveUseBuffer = KisOpenGL::shouldUseTextureBuffers(useBuffer);
413 initBufferStorage(effectiveUseBuffer);
414
415 Q_FOREACH (KisTextureTile *tile, m_textureTiles) {
416 tile->setBufferStorage(effectiveUseBuffer ? &m_bufferStorage : 0);
417 tile->setNumMipmapLevels(NumMipmapLevels);
418 }
419}
void setNumMipmapLevels(int num)
void setBufferStorage(KisOpenGLBufferCircularStorage *bufferStorage)

References initBufferStorage(), m_bufferStorage, m_textureTiles, KisTextureTile::setBufferStorage(), KisTextureTile::setNumMipmapLevels(), and KisOpenGL::shouldUseTextureBuffers().

◆ updateInfoBuilder()

KisOpenGLUpdateInfoBuilder & KisOpenGLImageTextures::updateInfoBuilder ( )

Definition at line 442 of file kis_opengl_image_textures.cpp.

443{
444 return m_updateInfoBuilder;
445}

References m_updateInfoBuilder.

◆ updateTextureFormat()

void KisOpenGLImageTextures::updateTextureFormat ( )
private

TODO: add an optimization so that the tile->convertTo() method would not be called when not needed (DK)

Definition at line 635 of file kis_opengl_image_textures.cpp.

636{
637 QOpenGLContext *ctx = QOpenGLContext::currentContext();
638 if (!(m_image && ctx)) return;
639
640 if (!KisOpenGL::hasOpenGLES()) {
641#ifndef QT_OPENGL_ES_2
643 m_texturesInfo.type = GL_UNSIGNED_BYTE;
645#else
646 KIS_ASSERT_X(false, "KisOpenGLImageTextures::updateTextureFormat",
647 "Unexpected KisOpenGL::hasOpenGLES returned false");
648#endif
649 } else {
650#ifdef QT_OPENGL_ES_2
652 m_texturesInfo.type = GL_UNSIGNED_BYTE;
653 m_texturesInfo.format = GL_RGBA;
654#else
656 m_texturesInfo.type = GL_UNSIGNED_BYTE;
658 if(!ctx->hasExtension(QByteArrayLiteral("GL_EXT_texture_format_BGRA8888"))) {
659 // The red and blue channels are swapped, but it will be re-swapped
660 // by texture swizzle mask set in KisTextureTile::setTextureParameters
662 m_texturesInfo.type = GL_UNSIGNED_BYTE;
663 m_texturesInfo.format = GL_RGBA;
664 }
665#endif
666 }
667
668 const bool useHDRMode = KisOpenGLModeProber::instance()->useHDRMode();
669 const KoID colorModelId = m_image->colorSpace()->colorModelId();
670 const KoID colorDepthId = useHDRMode ? Float16BitsColorDepthID : m_image->colorSpace()->colorDepthId();
671
672 KoID destinationColorModelId = RGBAColorModelID;
673 KoID destinationColorDepthId = Integer8BitsColorDepthID;
674
675 dbgUI << "Choosing texture format:";
676
677 if (colorModelId == RGBAColorModelID) {
678 if (colorDepthId == Float16BitsColorDepthID) {
679 initializeRGBA16FTextures(ctx, m_texturesInfo, destinationColorDepthId);
680 }
681 else if (colorDepthId == Float32BitsColorDepthID) {
683#ifndef QT_OPENGL_ES_2
684 m_texturesInfo.internalFormat = GL_RGBA32F;
685 dbgUI << "Using float (GLES or GL3)";
686 m_texturesInfo.type = GL_FLOAT;
687 m_texturesInfo.format = GL_RGBA;
688 destinationColorDepthId = Float32BitsColorDepthID;
689 } else if (ctx->hasExtension("GL_ARB_texture_float")) {
690 m_texturesInfo.internalFormat = GL_RGBA32F_ARB;
691 dbgUI << "Using ARB float";
692 m_texturesInfo.type = GL_FLOAT;
693 m_texturesInfo.format = GL_RGBA;
694 destinationColorDepthId = Float32BitsColorDepthID;
695 } else if (ctx->hasExtension("GL_ATI_texture_float")) {
696 m_texturesInfo.internalFormat = GL_RGBA_FLOAT32_ATI;
697 dbgUI << "Using ATI float";
698 m_texturesInfo.type = GL_FLOAT;
699 m_texturesInfo.format = GL_RGBA;
700 destinationColorDepthId = Float32BitsColorDepthID;
701#else
702 if (ctx->format().majorVersion() >= 3) {
703 m_texturesInfo.internalFormat = GL_RGBA32F;
704 dbgUI << "Using float (GLES 3 non-Angle)";
705 m_texturesInfo.type = GL_FLOAT;
706 m_texturesInfo.format = GL_RGBA;
707 destinationColorDepthId = Float32BitsColorDepthID;
708 /* GL_EXT_texture_storage is GLES 2*/
709 /* GL_EXT_color_buffer_float is GLES 3*/
710 } else if (ctx->hasExtension("GL_OES_texture_float")
711 && (ctx->hasExtension("GL_EXT_texture_storage") || ctx->hasExtension("EXT_color_buffer_float"))
712 && ctx->hasExtension("GL_OES_texture_float_linear")) {
713 m_texturesInfo.internalFormat = GL_RGBA32F_EXT;
714 dbgUI << "Using float (GLES v2)";
715 m_texturesInfo.type = GL_FLOAT;
716 m_texturesInfo.format = GL_RGBA;
717 destinationColorDepthId = Float32BitsColorDepthID;
718 }
719#endif
720 }
721 }
722 else if (colorDepthId == Integer16BitsColorDepthID) {
723 if (!KisOpenGL::hasOpenGLES()) {
724#ifndef QT_OPENGL_ES_2
725 m_texturesInfo.internalFormat = GL_RGBA16;
726 m_texturesInfo.type = GL_UNSIGNED_SHORT;
727
728 // On arm M1, GL_BGRA format is not aligned properly at the driver
729 // changing the pixel format fixes the rendering problem when using
730 // texture buffers
731 // BUG: 445561
732#ifdef Q_OS_MACOS
733 m_texturesInfo.format = GL_RGBA;
734#else
736#endif
737 destinationColorDepthId = Integer16BitsColorDepthID;
738 dbgUI << "Using 16 bits rgba";
739#else
740 KIS_ASSERT_X(false,
741 "KisOpenGLCanvas2::updateTextureFormat",
742 "Unexpected KisOpenGL::hasOpenGLES returned false");
743#endif
744 } else {
745#ifdef EGL_ANGLE_platform_angle
746 // If OpenGL ES, fall back to 16-bit float -- supports HDR
747 // Angle does ship GL_EXT_texture_norm16 but it doesn't seem
748 // to be renderable by DXGI - it returns a pixel size of 0
749 initializeRGBA16FTextures(ctx, m_texturesInfo, destinationColorDepthId);
750#else
751 if (ctx->hasExtension("GL_EXT_texture_norm16")) {
753 m_texturesInfo.type = GL_UNSIGNED_SHORT;
754 m_texturesInfo.format = GL_RGBA;
755 destinationColorDepthId = Integer16BitsColorDepthID;
756 dbgUI << "Using 16 bits rgba (GLES v2)";
757 }
758#endif
759 }
760 }
761 }
762 else {
763 // We will convert the colorspace to 16 bits rgba, instead of 8 bits
764 if (colorDepthId == Integer16BitsColorDepthID) {
765 if (!KisOpenGL::hasOpenGLES()) {
766#ifndef QT_OPENGL_ES_2
767 m_texturesInfo.internalFormat = GL_RGBA16;
768 m_texturesInfo.type = GL_UNSIGNED_SHORT;
769 // On arm M1, GL_BGRA format is not aligned properly at the driver
770 // changing the pixel format fixes the rendering problem when using
771 // texture buffers
772 // BUG: 445561
773#ifdef Q_OS_MACOS
774 m_texturesInfo.format = GL_RGBA;
775#else
777#endif
778 destinationColorDepthId = Integer16BitsColorDepthID;
779 dbgUI << "Using conversion to 16 bits rgba";
780#else
781 KIS_ASSERT_X(false, "KisOpenGLCanvas2::updateTextureFormat",
782 "Unexpected KisOpenGL::hasOpenGLES returned false");
783#endif
784 } else {
785#ifdef EGL_ANGLE_platform_angle
786 // If OpenGL ES, fall back to 16-bit float -- supports HDR
787 // Angle does ship GL_EXT_texture_norm16 but it doesn't seem
788 // to be renderable by DXGI - it returns a pixel size of 0
789 initializeRGBA16FTextures(ctx, m_texturesInfo, destinationColorDepthId);
790#else
791 if (ctx->hasExtension("GL_EXT_texture_norm16")) {
793 m_texturesInfo.type = GL_UNSIGNED_SHORT;
794 m_texturesInfo.format = GL_RGBA;
795 destinationColorDepthId = Integer16BitsColorDepthID;
796 dbgUI << "Using conversion to 16 bits rgba (GLES v2)";
797 }
798#endif
799 }
800 } else if (colorDepthId == Float16BitsColorDepthID) {
801 initializeRGBA16FTextures(ctx, m_texturesInfo, destinationColorDepthId);
802 }
803 }
804
806 colorModelId != destinationColorModelId) {
807
808 KisConfig cfg(false);
809 KisConfig::OcioColorManagementMode cm = cfg.ocioColorManagementMode();
810
811 if (cm != KisConfig::INTERNAL) {
813 i18n("OpenColorIO is disabled: image color space is not supported"), 5000, true);
814 }
815
816 warnUI << "WARNING: Internal color management was forcibly enabled";
817 warnUI << "Color Management Mode: " << cm;
819 warnUI << ppVar(destinationColorModelId);
820 warnUI << ppVar(destinationColorDepthId);
821
822 cfg.setOcioColorManagementMode(KisConfig::INTERNAL);
824 }
825
826 const KoColorProfile *profile =
828 colorModelId != destinationColorModelId ?
830
836 const KoColorSpace *tilesDestinationColorSpace =
837 KoColorSpaceRegistry::instance()->colorSpace(destinationColorModelId.id(),
838 destinationColorDepthId.id(),
839 profile);
840
842 ConversionOptions(tilesDestinationColorSpace,
845}
const KoID Float32BitsColorDepthID("F32", ki18n("32-bit float/channel"))
const KoID Float16BitsColorDepthID("F16", ki18n("16-bit float/channel"))
const KoID Integer8BitsColorDepthID("U8", ki18n("8-bit integer/channel"))
const KoID Integer16BitsColorDepthID("U16", ki18n("16-bit integer/channel"))
OcioColorManagementMode
Definition kis_config.h:471
const KoColorSpace * colorSpace() const
void sigShowFloatingMessage(const QString &message, int timeout, bool priority)
static KisOpenGLModeProber * instance()
static bool hasOpenGLES()
static bool hasOpenGL3()
virtual KoID colorModelId() const =0
Definition KoID.h:30
#define KIS_ASSERT_X(cond, where, what)
Definition kis_assert.h:40
#define ppVar(var)
Definition kis_debug.h:155
#define warnUI
Definition kis_debug.h:94
#define GL_BGRA
#define GL_RGBA16_EXT
#define GL_BGRA8_EXT
#define GL_BGRA_EXT

References KoColorSpace::colorDepthId(), KoColorSpace::colorModelId(), KisImage::colorSpace(), KoColorSpaceRegistry::colorSpace(), dbgUI, Float16BitsColorDepthID, Float32BitsColorDepthID, KisGLTexturesInfo::format, GL_BGRA, GL_BGRA8_EXT, GL_BGRA_EXT, GL_RGBA16_EXT, KisOpenGL::hasOpenGL3(), KisOpenGL::hasOpenGLES(), KoID::id(), KoColorSpaceRegistry::instance(), KisOpenGLModeProber::instance(), Integer16BitsColorDepthID, Integer8BitsColorDepthID, KisConfig::INTERNAL, KisGLTexturesInfo::internalFormat, KIS_ASSERT_X, m_conversionFlags, m_image, m_internalColorManagementActive, m_monitorProfile, m_renderingIntent, m_texturesInfo, m_updateInfoBuilder, KisConfig::ocioColorManagementMode(), ppVar, KoColorSpace::profile(), RGBAColorModelID, KisOpenGLUpdateInfoBuilder::setConversionOptions(), KisConfig::setOcioColorManagementMode(), sigShowFloatingMessage(), KisGLTexturesInfo::type, KisOpenGLModeProber::useHDRMode(), and warnUI.

◆ xToCol()

int KisOpenGLImageTextures::xToCol ( int x)
inline

Definition at line 116 of file kis_opengl_image_textures.h.

◆ yToRow()

int KisOpenGLImageTextures::yToRow ( int y)
inline

Definition at line 120 of file kis_opengl_image_textures.h.

Member Data Documentation

◆ BACKGROUND_TEXTURE_CHECK_SIZE

const int KisOpenGLImageTextures::BACKGROUND_TEXTURE_CHECK_SIZE = 32
static

The background checkers texture.

Definition at line 97 of file kis_opengl_image_textures.h.

◆ BACKGROUND_TEXTURE_SIZE

const int KisOpenGLImageTextures::BACKGROUND_TEXTURE_SIZE = BACKGROUND_TEXTURE_CHECK_SIZE * 2
static

Definition at line 98 of file kis_opengl_image_textures.h.

◆ m_bufferStorage

KisOpenGLBufferCircularStorage KisOpenGLImageTextures::m_bufferStorage
private

Definition at line 208 of file kis_opengl_image_textures.h.

◆ m_checkerTexture

boost::optional<GLuint> KisOpenGLImageTextures::m_checkerTexture
private

Definition at line 202 of file kis_opengl_image_textures.h.

◆ m_conversionFlags

KoColorConversionTransformation::ConversionFlags KisOpenGLImageTextures::m_conversionFlags
private

Definition at line 192 of file kis_opengl_image_textures.h.

◆ m_glFuncs

QOpenGLFunctions* KisOpenGLImageTextures::m_glFuncs {nullptr}
private

Definition at line 213 of file kis_opengl_image_textures.h.

213{nullptr};

◆ m_image

KisImageWSP KisOpenGLImageTextures::m_image
private

Definition at line 188 of file kis_opengl_image_textures.h.

◆ m_initialized

bool KisOpenGLImageTextures::m_initialized {false}
private

Definition at line 216 of file kis_opengl_image_textures.h.

216{false};

◆ m_internalColorManagementActive

bool KisOpenGLImageTextures::m_internalColorManagementActive {true}
private

Shows whether the internal color management should be enabled or not. Please note that if you disable color management, but your image color space will not be supported (non-RGB), then it will be enabled anyway. And this variable will hold the real state of affairs!

Definition at line 200 of file kis_opengl_image_textures.h.

200{true};

◆ m_monitorProfile

const KoColorProfile* KisOpenGLImageTextures::m_monitorProfile {nullptr}
private

Definition at line 190 of file kis_opengl_image_textures.h.

190{nullptr};

◆ m_numCols

int KisOpenGLImageTextures::m_numCols {0}
private

Definition at line 205 of file kis_opengl_image_textures.h.

205{0};

◆ m_renderingIntent

KoColorConversionTransformation::Intent KisOpenGLImageTextures::m_renderingIntent
private

Definition at line 191 of file kis_opengl_image_textures.h.

◆ m_storedImageBounds

QRect KisOpenGLImageTextures::m_storedImageBounds
private

Definition at line 189 of file kis_opengl_image_textures.h.

◆ m_texturesInfo

KisGLTexturesInfo KisOpenGLImageTextures::m_texturesInfo
private

Definition at line 204 of file kis_opengl_image_textures.h.

◆ m_textureTiles

QVector<KisTextureTile*> KisOpenGLImageTextures::m_textureTiles
private

Definition at line 209 of file kis_opengl_image_textures.h.

◆ m_tileTexCoordBuffer

QOpenGLBuffer KisOpenGLImageTextures::m_tileTexCoordBuffer
private

Definition at line 211 of file kis_opengl_image_textures.h.

◆ m_tileVertexBuffer

QOpenGLBuffer KisOpenGLImageTextures::m_tileVertexBuffer
private

Definition at line 210 of file kis_opengl_image_textures.h.

◆ m_updateInfoBuilder

KisOpenGLUpdateInfoBuilder KisOpenGLImageTextures::m_updateInfoBuilder
private

Definition at line 218 of file kis_opengl_image_textures.h.

◆ m_useOcio

bool KisOpenGLImageTextures::m_useOcio {false}
private

Definition at line 215 of file kis_opengl_image_textures.h.

215{false};

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