D16802: effects: attempt to screenshot on OpenGL ES 2.0 instead of failing

Martin Flöser <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
graesslin added a comment.


  In D16802#357609 <https://phabricator.kde.org/D16802#357609>, @bshah wrote:
  
  > Ah, now that I read code of `GLRenderTarget::blitFromFramebuffer` this makes sense,
  >
  > This code path is executed only when `blitSupported` is true. Which makes it crash.
  
  
  The problem is that calls into OpenGL extensions can crash if it's not available. The proper behavior is to return a null pointer if an extension is missing. So the change you did here would crash on any driver not supporting blit and properly returning null for the blit functionality.
  
  > But on adreno devices somehow I get working screenshot even without framebufferBlit by just doing glReadPixels.
  
  glReadPixels is slow. That's not a general solution and I would recommend against using it. It's better to not do a screenshot than screenshot with glReadPixels.

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D16802

To: bshah, #kwin, davidedmundson, graesslin
Cc: graesslin, kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, ngraham, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.