[effects] Make sure that all effects reset the streaming buffer
ClosedPublic

Authored by zzag on Feb 15 2019, 12:41 PM.

Details

Summary

The streaming buffer is shared so we have to reset it before rendering
something. Otherwise, it's basically undefined behavior.

For example, if the streaming buffer had been used for rendering a
geometry with some color, then the Background Contrast effect may crash
in GLVertexBuffer::bindArrays, it all depends on whether there is any
bounded GLShader. To fix that, the buffer has to be reset.

BUG: 356141

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zzag created this revision.Feb 15 2019, 12:41 PM
Restricted Application added a project: KWin. · View Herald TranscriptFeb 15 2019, 12:41 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Feb 15 2019, 12:41 PM

It seems effects/blur needs the same fix.

zzag updated this revision to Diff 51746.Feb 15 2019, 12:56 PM
zzag retitled this revision from [effects/backgroundcontrast] Reset vbo to [effects] Make sure that all effects reset the streaming buffer.
  • Reset vbo in the bluf effect;
  • Retitle,.
davidedmundson accepted this revision.Feb 15 2019, 1:29 PM
This revision is now accepted and ready to land.Feb 15 2019, 1:29 PM
This revision was automatically updated to reflect the committed changes.