[libkwineffects] Restore GL_DRAW_FRAMEBUFFER binding in GLTexture::clear
ClosedPublic

Authored by zzag on Nov 18 2019, 10:00 AM.

Details

Summary

If an effect renders a window into an offscreen texture, it's very important
that the window ends up in the offscreen render target rather than the default
framebuffer object. However, that might be not the case if the OpenGL
decoration renderer needs to create a texture atlas since the renderer calls
GLTexture::clear() method, which might clobber the current GL_DRAW_FRAMEBUFFER
binding.

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.Nov 18 2019, 10:00 AM
Restricted Application added a project: KWin. · View Herald TranscriptNov 18 2019, 10:00 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Nov 18 2019, 10:00 AM
zzag added a comment.Nov 18 2019, 10:06 AM

I'm targeting 5.17.X and perhaps 5.12.X.

zzag added a comment.EditedNov 18 2019, 10:10 AM

Test plan:

I did not include this test plan in the commit message to avoid "advertising" the effect.

davidedmundson accepted this revision.Nov 18 2019, 10:19 AM
This revision is now accepted and ready to land.Nov 18 2019, 10:19 AM
This revision was automatically updated to reflect the committed changes.