scenes/opengl: Remove viewport check
It's unreliable and it sometimes produces false positives (due to buggy drivers).
This commit is contained in:
parent
1cf1703dec
commit
350144cde6
2 changed files with 0 additions and 22 deletions
|
@ -75,9 +75,6 @@ SceneOpenGL::SceneOpenGL(OpenGLBackend *backend, QObject *parent)
|
|||
: Scene(parent)
|
||||
, m_backend(backend)
|
||||
{
|
||||
if (!viewportLimitsMatched(screens()->size()))
|
||||
return;
|
||||
|
||||
// perform Scene specific checks
|
||||
GLPlatform *glPlatform = GLPlatform::instance();
|
||||
if (!glPlatform->isGLES() && !hasGLExtension(QByteArrayLiteral("GL_ARB_texture_non_power_of_two"))
|
||||
|
@ -568,24 +565,6 @@ void SceneOpenGL::extendPaintRegion(QRegion ®ion, bool opaqueFullscreen)
|
|||
}
|
||||
}
|
||||
|
||||
bool SceneOpenGL::viewportLimitsMatched(const QSize &size) const {
|
||||
if (kwinApp()->operationMode() != Application::OperationModeX11) {
|
||||
// TODO: On Wayland we can't suspend. Find a solution that works here as well!
|
||||
return true;
|
||||
}
|
||||
GLint limit[2];
|
||||
glGetIntegerv(GL_MAX_VIEWPORT_DIMS, limit);
|
||||
if (limit[0] < size.width() || limit[1] < size.height()) {
|
||||
auto compositor = static_cast<X11Compositor*>(Compositor::self());
|
||||
QMetaObject::invokeMethod(compositor, [compositor]() {
|
||||
qCDebug(KWIN_OPENGL) << "Suspending compositing because viewport limits are not met";
|
||||
compositor->suspend(X11Compositor::AllReasonSuspend);
|
||||
}, Qt::QueuedConnection);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void SceneOpenGL::paintDesktop(int desktop, int mask, const QRegion ®ion, ScreenPaintData &data)
|
||||
{
|
||||
const QRect r = region.boundingRect();
|
||||
|
|
|
@ -79,7 +79,6 @@ protected:
|
|||
void paintCursor(const QRegion ®ion) override;
|
||||
|
||||
private:
|
||||
bool viewportLimitsMatched(const QSize &size) const;
|
||||
void doPaintBackground(const QVector< float >& vertices);
|
||||
void updateProjectionMatrix(const QRect &geometry);
|
||||
void performPaintWindow(EffectWindowImpl* w, int mask, const QRegion ®ion, WindowPaintData& data);
|
||||
|
|
Loading…
Reference in a new issue