Skip to content
This repository
Browse code

gles, fixed, add missing functions

  • Loading branch information...
commit 753f414209bf921f03e16984d7b110443e13729b 1 parent 2df043a
authored September 26, 2013
27  xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
@@ -419,6 +419,22 @@ void CLinuxRendererGLES::Reset()
419 419
   }
420 420
 }
421 421
 
  422
+void CLinuxRendererGLES::Flush()
  423
+{
  424
+  if (!m_bValidated)
  425
+    return;
  426
+
  427
+  glFinish();
  428
+
  429
+  for (int i = 0 ; i < m_NumYV12Buffers ; i++)
  430
+    (this->*m_textureDelete)(i);
  431
+
  432
+  glFinish();
  433
+  m_bValidated = false;
  434
+  m_fbo.Cleanup();
  435
+  m_iYV12RenderBuffer = 0;
  436
+}
  437
+
422 438
 void CLinuxRendererGLES::Update()
423 439
 {
424 440
   if (!m_bConfigured) return;
@@ -795,6 +811,17 @@ inline void CLinuxRendererGLES::ReorderDrawPoints()
795 811
   }
796 812
 }
797 813
 
  814
+void CLinuxRendererGLES::ReleaseBuffer(int idx)
  815
+{
  816
+#ifdef HAVE_VIDEOTOOLBOXDECODER
  817
+  YUVBUFFER &buf = m_buffers[idx];
  818
+
  819
+  if (buf.cvBufferRef)
  820
+    CVBufferRelease(buf.cvBufferRef);
  821
+  buf.cvBufferRef = NULL;
  822
+#endif
  823
+}
  824
+
798 825
 void CLinuxRendererGLES::Render(DWORD flags, int index)
799 826
 {
800 827
   // If rendered directly by the hardware
2  xbmc/cores/VideoRenderers/LinuxRendererGLES.h
@@ -138,7 +138,9 @@ class CLinuxRendererGLES : public CBaseRenderer
138 138
   virtual unsigned int PreInit();
139 139
   virtual void         UnInit();
140 140
   virtual void         Reset(); /* resets renderer after seek for example */
  141
+  virtual void         Flush();
141 142
   virtual void         ReorderDrawPoints();
  143
+  virtual void         ReleaseBuffer(int idx);
142 144
   virtual void         SetBufferSize(int numBuffers) { m_NumYV12Buffers = numBuffers; }
143 145
   virtual unsigned int GetMaxBufferSize() { return NUM_BUFFERS; }
144 146
   virtual unsigned int GetProcessorSize();

0 notes on commit 753f414

Please sign in to comment.
Something went wrong with that request. Please try again.