UI: remove unused lock and fence (#24355)

old-commit-hash: 7ac92938d246030095c2928d24d55d74b57565db
This commit is contained in:
Joost Wooning
2022-05-02 03:57:39 +02:00
committed by GitHub
parent badb143cc7
commit 3783eb811f
2 changed files with 0 additions and 16 deletions
-7
View File
@@ -214,16 +214,9 @@ void CameraViewWidget::paintGL() {
glClearColor(bg.redF(), bg.greenF(), bg.blueF(), bg.alphaF());
glClear(GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
std::lock_guard lk(lock);
if (latest_frame == nullptr) return;
glViewport(0, 0, width(), height());
// sync with the PBO
if (wait_fence) {
wait_fence->wait();
}
glBindVertexArray(frame_vao);
glUseProgram(program->programId());
-9
View File
@@ -35,19 +35,10 @@ protected:
virtual void updateFrameMat(int w, int h);
void vipcThread();
struct WaitFence {
WaitFence() { sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); }
~WaitFence() { glDeleteSync(sync); }
void wait() { glWaitSync(sync, 0, GL_TIMEOUT_IGNORED); }
GLsync sync = 0;
};
bool zoomed_view;
std::mutex lock;
VisionBuf *latest_frame = nullptr;
GLuint frame_vao, frame_vbo, frame_ibo;
mat4 frame_mat;
std::unique_ptr<WaitFence> wait_fence;
std::unique_ptr<QOpenGLShaderProgram> program;
QColor bg = QColor("#000000");