Skip to content

Commit 7ac9293

Browse files
authored
UI: remove unused lock and fence (commaai#24355)
1 parent 39cf862 commit 7ac9293

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

selfdrive/ui/qt/widgets/cameraview.cc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -214,16 +214,9 @@ void CameraViewWidget::paintGL() {
214214
glClearColor(bg.redF(), bg.greenF(), bg.blueF(), bg.alphaF());
215215
glClear(GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
216216

217-
std::lock_guard lk(lock);
218-
219217
if (latest_frame == nullptr) return;
220218

221219
glViewport(0, 0, width(), height());
222-
// sync with the PBO
223-
if (wait_fence) {
224-
wait_fence->wait();
225-
}
226-
227220
glBindVertexArray(frame_vao);
228221

229222
glUseProgram(program->programId());

selfdrive/ui/qt/widgets/cameraview.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,10 @@ class CameraViewWidget : public QOpenGLWidget, protected QOpenGLFunctions {
3535
virtual void updateFrameMat(int w, int h);
3636
void vipcThread();
3737

38-
struct WaitFence {
39-
WaitFence() { sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); }
40-
~WaitFence() { glDeleteSync(sync); }
41-
void wait() { glWaitSync(sync, 0, GL_TIMEOUT_IGNORED); }
42-
GLsync sync = 0;
43-
};
44-
4538
bool zoomed_view;
46-
std::mutex lock;
4739
VisionBuf *latest_frame = nullptr;
4840
GLuint frame_vao, frame_vbo, frame_ibo;
4941
mat4 frame_mat;
50-
std::unique_ptr<WaitFence> wait_fence;
5142
std::unique_ptr<QOpenGLShaderProgram> program;
5243
QColor bg = QColor("#000000");
5344

0 commit comments

Comments
 (0)