    std::recursive_mutex frame_lock;
    std::deque<std::pair<uint32_t, VisionBuf*>> frames;
    uint32_t draw_frame_id = 0;
  
  protected slots:
    void vipcConnected(VisionIpcClient *vipc_client);
    void vipcFrameReceived();
  };
 
</s> remove   std::mutex frame_lock;
 </s> add   std::recursive_mutex frame_lock; </s> remove   std::atomic<VisionStreamType> stream_type;
 </s> add   std::atomic<VisionStreamType> active_stream_type;
  std::atomic<VisionStreamType> requested_stream_type; </s> remove   void setStreamType(VisionStreamType type) { stream_type = type; }
 </s> add 
  uint32_t prev_frame_id = 0;
    std::recursive_mutex frame_lock;
    std::deque<std::pair<uint32_t, VisionBuf*>> frames;
    uint32_t draw_frame_id = 0;
  uint32_t prev_frame_id = 0;
  
  protected slots:
    void vipcConnected(VisionIpcClient *vipc_client);
    void vipcFrameReceived();
  };
keep keep add 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.h