[rendercapture] Fix passthrough rendercapture interface
authorpopcornmix <popcornmix@gmail.com>
Sat, 7 Sep 2013 17:32:58 +0000 (18:32 +0100)
committerpopcornmix <popcornmix@gmail.com>
Sat, 7 Sep 2013 17:35:43 +0000 (18:35 +0100)
The RenderCapture function doesn't behave correctly for passthough video renderers,
and in fact segfaults on Pi when setting a bookmark.

There is no need to do a glReadPixels to get a video snapshot in the passthrough case,
so provide a shortcut.

xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp

index f9f5aa4..ee03b2f 100644 (file)
@@ -1421,6 +1421,14 @@ bool CLinuxRendererGLES::RenderCapture(CRenderCapture* capture)
   if (!m_bValidated)
     return false;
 
+  // If rendered directly by the hardware
+  if (m_renderMethod & RENDER_BYPASS)
+  {
+    capture->BeginRender();
+    capture->EndRender();
+    return true;
+  }
+
   // save current video rect
   CRect saveSize = m_destRect;
   saveRotatedCoords();//backup current m_rotatedDestCoords