  }
  
  void CameraWidget::updateCalibration(const mat3 &calib) {
    calibration = calib;
    updateFrameMat();
  }
  
  void CameraWidget::paintGL() {
    glClearColor(bg.redF(), bg.greenF(), bg.blueF(), bg.alphaF());
    glClear(GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
 
</s> remove   void hideEvent(QHideEvent *event) override;
 </s> add  </s> remove   std::mutex frame_lock;
 </s> add   std::recursive_mutex frame_lock; </s> remove 
  updateFrameMat();
 </s> add  </s> remove   }
  if (s->worldObjectsVisible()) {
    if (sm.updated("modelV2")) {
      update_model(s, sm["modelV2"].getModelV2());
    }
    if (sm.updated("radarState") && sm.rcv_frame("modelV2") > s->scene.started_frame) {
      update_leads(s, sm["radarState"].getRadarState(), sm["modelV2"].getModelV2().getPosition());
    }
 </s> add     scene.calibration_wide_valid = wfde_list.size() == 3;
  }
  
  void CameraWidget::updateCalibration(const mat3 &calib) {
    calibration = calib;

  }
  
  void CameraWidget::paintGL() {
    glClearColor(bg.redF(), bg.greenF(), bg.blueF(), bg.alphaF());
    glClear(GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
keep keep keep keep replace keep keep keep keep keep
 UI: draw onroad objects on right frame (#26306)

* update before draw

* fix a lot of janky

* fix more flicker

* cleanup

* fix flicker when opening settings

* simplify 
selfdrive/ui/qt/widgets/cameraview.cc