Don't render shadows if there are no quads

This commit is contained in:
Martin Gräßlin 2011-06-26 12:00:08 +02:00
parent a9dcadfd33
commit bb8b92f93d

View file

@ -665,6 +665,9 @@ void SceneOpenGL::Window::paintShadow(const QRegion &region, const WindowPaintDa
quads.append(data.quads.select(WindowQuadShadowBottom));
quads.append(data.quads.select(WindowQuadShadowBottomLeft));
quads.append(data.quads.select(WindowQuadShadowLeft));
if (quads.isEmpty()) {
return;
}
GLTexture *texture = static_cast<SceneOpenGLShadow*>(m_shadow)->shadowTexture();
if (!texture) {
return;