Changeset View
Changeset View
Standalone View
Standalone View
platformsupport/scenes/opengl/abstract_egl_backend.cpp
Show First 20 Lines • Show All 385 Lines • ▼ Show 20 Line(s) | 376 | if (!buffer->shmBuffer()) { | |||
---|---|---|---|---|---|
386 | } | 386 | } | ||
387 | return; | 387 | return; | ||
388 | } | 388 | } | ||
389 | // shm fallback | 389 | // shm fallback | ||
390 | const QImage &image = buffer->data(); | 390 | const QImage &image = buffer->data(); | ||
391 | if (image.isNull() || !s) { | 391 | if (image.isNull() || !s) { | ||
392 | return; | 392 | return; | ||
393 | } | 393 | } | ||
394 | if (image.size() != m_size) { | ||||
395 | // buffer size has changed, reload shm texture | ||||
396 | if (!loadTexture(pixmap)) { | ||||
397 | return; | ||||
398 | } | ||||
399 | } | ||||
394 | Q_ASSERT(image.size() == m_size); | 400 | Q_ASSERT(image.size() == m_size); | ||
395 | q->bind(); | 401 | q->bind(); | ||
396 | const QRegion damage = s->trackedDamage(); | 402 | const QRegion damage = s->trackedDamage(); | ||
397 | s->resetTrackedDamage(); | 403 | s->resetTrackedDamage(); | ||
398 | auto scale = s->scale(); //damage is normalised, so needs converting up to match texture | 404 | auto scale = s->scale(); //damage is normalised, so needs converting up to match texture | ||
399 | 405 | | |||
400 | // TODO: this should be shared with GLTexture::update | 406 | // TODO: this should be shared with GLTexture::update | ||
401 | if (GLPlatform::instance()->isGLES()) { | 407 | if (GLPlatform::instance()->isGLES()) { | ||
▲ Show 20 Lines • Show All 143 Lines • Show Last 20 Lines |