opengl: remove locks from texture
These are not used anymore and are therefore unnecessary.
This commit is contained in:
@@ -128,8 +128,6 @@ void OpenGLBackend::ParamsChangedEvent()
|
||||
|
||||
OpenGLTexturePtr OpenGLBackend::CopyTexture(OpenGLTexturePtr input)
|
||||
{
|
||||
input->Lock();
|
||||
|
||||
QOpenGLContext* ctx = QOpenGLContext::currentContext();
|
||||
|
||||
OpenGLTexturePtr copy = std::make_shared<OpenGLTexture>();
|
||||
@@ -147,7 +145,5 @@ OpenGLTexturePtr OpenGLBackend::CopyTexture(OpenGLTexturePtr input)
|
||||
copy_buffer_.Release();
|
||||
copy_buffer_.Detach();
|
||||
|
||||
input->Unlock();
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
||||
@@ -364,8 +364,6 @@ void OpenGLProxy::TextureToBuffer(const QVariant &tex_in, QByteArray &buffer)
|
||||
|
||||
PixelFormat::Info format_info = PixelService::GetPixelFormatInfo(video_params_.format());
|
||||
|
||||
texture->texture()->Lock();
|
||||
|
||||
QOpenGLFunctions* f = QOpenGLContext::currentContext()->functions();
|
||||
buffer_.Attach(texture->texture());
|
||||
buffer_.Bind();
|
||||
@@ -380,8 +378,6 @@ void OpenGLProxy::TextureToBuffer(const QVariant &tex_in, QByteArray &buffer)
|
||||
|
||||
buffer_.Release();
|
||||
buffer_.Detach();
|
||||
|
||||
texture->texture()->Unlock();
|
||||
}
|
||||
|
||||
void OpenGLProxy::SetParameters(const VideoRenderingParams ¶ms)
|
||||
|
||||
@@ -156,16 +156,6 @@ void OpenGLTexture::Upload(const void *data)
|
||||
Release();
|
||||
}
|
||||
|
||||
void OpenGLTexture::Lock()
|
||||
{
|
||||
mutex_.lock();
|
||||
}
|
||||
|
||||
void OpenGLTexture::Unlock()
|
||||
{
|
||||
mutex_.unlock();
|
||||
}
|
||||
|
||||
void OpenGLTexture::CreateInternal(QOpenGLContext* create_ctx, GLuint* tex, const void *data)
|
||||
{
|
||||
QOpenGLFunctions* f = create_ctx->functions();
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#define OPENGLTEXTURE_H
|
||||
|
||||
#include <memory>
|
||||
#include <QMutex>
|
||||
#include <QOpenGLFunctions>
|
||||
|
||||
#include "codec/frame.h"
|
||||
@@ -60,10 +59,6 @@ public:
|
||||
|
||||
void Upload(const void *data);
|
||||
|
||||
void Lock();
|
||||
|
||||
void Unlock();
|
||||
|
||||
public slots:
|
||||
void Destroy();
|
||||
|
||||
@@ -80,8 +75,6 @@ private:
|
||||
|
||||
PixelFormat::Format format_;
|
||||
|
||||
QMutex mutex_;
|
||||
|
||||
};
|
||||
|
||||
using OpenGLTexturePtr = std::shared_ptr<OpenGLTexture>;
|
||||
|
||||
Reference in New Issue
Block a user