Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #2956 from davilla/drop-texturedone-event-for-gles

renderer: drop old texture done event for gles
  • Loading branch information...
commit b7873a5e2858413c09f5dbb4a90d9c74926273aa 2 parents 2d8bff2 + 874607a
@davilla davilla authored
View
38 xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
@@ -84,8 +84,6 @@ CLinuxRendererGLES::YUVBUFFER::~YUVBUFFER()
CLinuxRendererGLES::CLinuxRendererGLES()
{
m_textureTarget = GL_TEXTURE_2D;
- for (int i = 0; i < NUM_BUFFERS; i++)
- m_eventTexturesDone[i] = new CEvent(false,true);
m_renderMethod = RENDER_GLSL;
m_oldRenderMethod = m_renderMethod;
@@ -124,8 +122,6 @@ CLinuxRendererGLES::CLinuxRendererGLES()
CLinuxRendererGLES::~CLinuxRendererGLES()
{
UnInit();
- for (int i = 0; i < NUM_BUFFERS; i++)
- delete m_eventTexturesDone[i];
if (m_rgbBuffer != NULL) {
delete [] m_rgbBuffer;
@@ -250,12 +246,7 @@ int CLinuxRendererGLES::GetImage(YV12Image *image, int source, bool readonly)
if( readonly )
im.flags |= IMAGE_FLAG_READING;
else
- {
- if( !m_eventTexturesDone[source]->WaitMSec(500) )
- CLog::Log(LOGWARNING, "%s - Timeout waiting for texture %d", __FUNCTION__, source);
-
im.flags |= IMAGE_FLAG_WRITING;
- }
// copy the image - should be operator of YV12Image
for (int p=0;p<MAX_PLANES;p++)
@@ -279,9 +270,6 @@ void CLinuxRendererGLES::ReleaseImage(int source, bool preserve)
{
YV12Image &im = m_buffers[source].image;
- if( im.flags & IMAGE_FLAG_WRITING )
- m_eventTexturesDone[source]->Set();
-
im.flags &= ~IMAGE_FLAG_INUSE;
im.flags |= IMAGE_FLAG_READY;
/* if image should be preserved reserve it so it's not auto seleceted */
@@ -398,8 +386,6 @@ void CLinuxRendererGLES::Reset()
{
/* reset all image flags, this will cleanup textures later */
m_buffers[i].image.flags = 0;
- /* reset texture locks, a bit ugly, could result in tearing */
- m_eventTexturesDone[i]->Set();
}
}
@@ -462,19 +448,7 @@ void CLinuxRendererGLES::RenderUpdate(bool clear, DWORD flags, DWORD alpha)
g_graphicsContext.BeginPaint();
- if( !m_eventTexturesDone[index]->WaitMSec(500))
- {
- CLog::Log(LOGWARNING, "%s - Timeout waiting for texture %d", __FUNCTION__, index);
-
- // render the previous frame if this one isn't ready yet
- if (m_iLastRenderBuffer > -1)
- {
- m_iYV12RenderBuffer = m_iLastRenderBuffer;
- index = m_iYV12RenderBuffer;
- }
- }
- else
- m_iLastRenderBuffer = index;
+ m_iLastRenderBuffer = index;
if (clear)
{
@@ -1397,7 +1371,6 @@ void CLinuxRendererGLES::UploadYV12Texture(int source)
if (!(im->flags&IMAGE_FLAG_READY))
#endif
{
- m_eventTexturesDone[source]->Set();
return;
}
@@ -1524,8 +1497,6 @@ void CLinuxRendererGLES::UploadYV12Texture(int source)
, im->stride[2], im->plane[2] );
}
}
- m_eventTexturesDone[source]->Set();
-
CalculateTextureSourceRects(source, 3);
glDisable(m_textureTarget);
@@ -1669,7 +1640,6 @@ bool CLinuxRendererGLES::CreateYV12Texture(int index)
}
}
glDisable(m_textureTarget);
- m_eventTexturesDone[index]->Set();
return true;
}
@@ -1728,8 +1698,6 @@ void CLinuxRendererGLES::UploadCVRefTexture(int index)
plane.flipindex = m_buffers[index].flipindex;
}
-
- m_eventTexturesDone[index]->Set();
#endif
}
void CLinuxRendererGLES::DeleteCVRefTexture(int index)
@@ -1801,8 +1769,6 @@ bool CLinuxRendererGLES::CreateCVRefTexture(int index)
#endif
glBindTexture(m_textureTarget, 0);
glDisable(m_textureTarget);
-
- m_eventTexturesDone[index]->Set();
#endif
return true;
}
@@ -1812,14 +1778,12 @@ bool CLinuxRendererGLES::CreateCVRefTexture(int index)
//********************************************************************************************************
void CLinuxRendererGLES::UploadBYPASSTexture(int index)
{
- m_eventTexturesDone[index]->Set();
}
void CLinuxRendererGLES::DeleteBYPASSTexture(int index)
{
}
bool CLinuxRendererGLES::CreateBYPASSTexture(int index)
{
- m_eventTexturesDone[index]->Set();
return true;
}
View
3  xbmc/cores/VideoRenderers/LinuxRendererGLES.h
@@ -281,9 +281,6 @@ class CLinuxRendererGLES : public CBaseRenderer
struct SwsContext *m_sw_context;
BYTE *m_rgbBuffer; // if software scale is used, this will hold the result image
unsigned int m_rgbBufferSize;
-
- CEvent* m_eventTexturesDone[NUM_BUFFERS];
-
};
Please sign in to comment.
Something went wrong with that request. Please try again.