Kaydet (Commit) 91fb0866 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

Use AutoTimer instead of Timer, and add some more locking.

Change-Id: I83a99e333a6c62bf7779e3fbbcc3e5af38bb2ca5
üst fa551c42
......@@ -31,6 +31,7 @@ OGLPlayer::OGLPlayer()
OGLPlayer::~OGLPlayer()
{
osl::MutexGuard aGuard(m_aMutex);
if( m_pHandle )
{
for (size_t i = 0; i < m_pHandle->size; ++i)
......@@ -63,6 +64,8 @@ static bool lcl_LoadFile( glTFFile* io_pFile, const OUString& rURL)
bool OGLPlayer::create( const OUString& rURL )
{
osl::MutexGuard aGuard(m_aMutex);
m_sURL = rURL;
// Load *.json file and init renderer
......@@ -297,8 +300,8 @@ IMPL_LINK(OGLPlayer,TimerHandler,Timer*,pTimer)
{
if (pTimer == &m_aTimer)
{
osl::MutexGuard aGuard(m_aMutex);
m_pOGLWindow->update();
m_aTimer.Start();
}
return 0;
......
......@@ -62,7 +62,7 @@ private:
OUString m_sURL;
glTFHandle* m_pHandle;
OpenGLContext m_aContext;
Timer m_aTimer;
AutoTimer m_aTimer;
OGLWindow* m_pOGLWindow;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment