  void CameraViewWidget::vipcThread() {
    VisionStreamType cur_stream_type = stream_type;
    std::unique_ptr<VisionIpcClient> vipc_client;
  
    std::unique_ptr<QOpenGLContext> ctx;
    std::unique_ptr<QOffscreenSurface> surface;
    std::unique_ptr<QOpenGLBuffer> gl_buffer;
  
    ctx = std::make_unique<QOpenGLContext>();
    ctx->setFormat(context()->format());
    ctx->setShareContext(context());
    ctx->create();
    assert(ctx->isValid());
  
    surface = std::make_unique<QOffscreenSurface>();
    surface->setFormat(ctx->format());
    surface->create();
    ctx->makeCurrent(surface.get());
    assert(QOpenGLContext::currentContext() == ctx.get());
    initializeOpenGLFunctions();
  
    while (!QThread::currentThread()->isInterruptionRequested()) {
      if (!vipc_client || cur_stream_type != stream_type) {
        cur_stream_type = stream_type;
        vipc_client.reset(new VisionIpcClient(stream_name, cur_stream_type, true));
      }
 
</s> remove   latest_texture_id = -1;
 </s> add   latest_frame = nullptr; </s> remove   int latest_texture_id = -1;
 </s> add   VisionBuf *latest_frame = nullptr; </s> remove   "./_ui": 33.0,
 </s> add   "./_ui": 18.4,
  void CameraViewWidget::vipcThread() {
    VisionStreamType cur_stream_type = stream_type;
    std::unique_ptr<VisionIpcClient> vipc_client;
  

















    while (!QThread::currentThread()->isInterruptionRequested()) {
      if (!vipc_client || cur_stream_type != stream_type) {
        cur_stream_type = stream_type;
        vipc_client.reset(new VisionIpcClient(stream_name, cur_stream_type, true));
      }
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 UI: remove memcpy on frame receive (#24318)

* UI: remove frame memcpy

* fix freezing

* fix onroad test 
selfdrive/ui/qt/widgets/cameraview.cc