From 7ac92938d246030095c2928d24d55d74b57565db Mon Sep 17 00:00:00 2001 From: Joost Wooning Date: Mon, 2 May 2022 03:57:39 +0200 Subject: [PATCH] UI: remove unused lock and fence (#24355) --- selfdrive/ui/qt/widgets/cameraview.cc | 7 ------- selfdrive/ui/qt/widgets/cameraview.h | 9 --------- 2 files changed, 16 deletions(-) diff --git a/selfdrive/ui/qt/widgets/cameraview.cc b/selfdrive/ui/qt/widgets/cameraview.cc index d817d55568..cb978182db 100644 --- a/selfdrive/ui/qt/widgets/cameraview.cc +++ b/selfdrive/ui/qt/widgets/cameraview.cc @@ -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()); diff --git a/selfdrive/ui/qt/widgets/cameraview.h b/selfdrive/ui/qt/widgets/cameraview.h index 1f19ea157b..6873e8e991 100644 --- a/selfdrive/ui/qt/widgets/cameraview.h +++ b/selfdrive/ui/qt/widgets/cameraview.h @@ -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 wait_fence; std::unique_ptr program; QColor bg = QColor("#000000");