        {
          std::lock_guard lk(frame_lock);
          frames.push_back(std::make_pair(meta_main.frame_id, buf));
          while (frames.size() > FRAME_BUFFER_SIZE) {
            qDebug() << "Skipped frame" << frames.front().first;
            frames.pop_front();
          }
        }
        emit vipcThreadFrameReceived();
      }
 
</s> remove       cur_stream_type = stream_type;
      vipc_client.reset(new VisionIpcClient(stream_name, cur_stream_type, false));
 </s> add       qDebug() << "connecting to stream " << requested_stream_type << ", was connected to " << cur_stream;
      cur_stream = requested_stream_type;;
      vipc_client.reset(new VisionIpcClient(stream_name, cur_stream, false)); </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; </s> remove   void hideEvent(QHideEvent *event) override;
 </s> add 
        {
          std::lock_guard lk(frame_lock);
          frames.push_back(std::make_pair(meta_main.frame_id, buf));
          while (frames.size() > FRAME_BUFFER_SIZE) {

            frames.pop_front();
          }
        }
        emit vipcThreadFrameReceived();
      }
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