  
    // NVG drawing functions - should be no GL inside NVG frame
    nvgBeginFrame(s->vg, s->fb_w, s->fb_h, 1.0f);
    ui_draw_sidebar(s);
    if (draw_vision && s->vision_connected) {
      ui_draw_vision(s);
    }
  
    if (draw_vision && s->scene.alert_size != cereal::ControlsState::AlertSize::NONE) {
      ui_draw_vision_alert(s);
 
</s> remove   if (draw_vision && s->vision_connected) {
 </s> add   if (draw_vision) { </s> remove                            s->active_app == cereal::UiLayoutState::App::NONE;
 </s> add     s->active_app == cereal::UiLayoutState::App::NONE && s->vipc_client->connected; </s> remove   for (int i = 0; i < UI_BUF_COUNT; i++) {
 </s> add   for (int i = 0; i < s->vipc_client->num_buffers; i++) { </s> remove   if (s->stream.last_idx >= 0) {
    glBindTexture(GL_TEXTURE_2D, s->frame_texs[s->stream.last_idx]);
 </s> add   if (s->last_frame) {
    glBindTexture(GL_TEXTURE_2D, s->frame_texs[s->last_frame->idx]);
  if (draw_vision) {
  
    // NVG drawing functions - should be no GL inside NVG frame
    nvgBeginFrame(s->vg, s->fb_w, s->fb_h, 1.0f);
    ui_draw_sidebar(s);
  if (draw_vision) {
      ui_draw_vision(s);
    }
  
    if (draw_vision && s->scene.alert_size != cereal::ControlsState::AlertSize::NONE) {
      ui_draw_vision_alert(s);
keep keep keep keep replace keep keep keep keep keep
 VisionIPC 2.0 (#19641)

* Squashed vipc

* Update release files

* Remove else

* add visionipc to release files

* use poller in vipc receive

* opencl framework instead of lib on macos

* Fix camera webcam

* Fix opencl on mac in ui

* more webcam fixes

* typo in ui sconsfile

* Use cur_yuv_buf

* visionbuf c++ class

* Camera qcom was still using visionbuf_allocate

* Turn loggerd back on

* fix snapshot

* No build needed

* update test camerad

* no more release callback

* make encoder c++

* Revert "no more release callback"

This reverts commit e5707b07002fee665d0483d90713154efc2d70d4.

* fix exit handlers

* No need to check errno

* move release callback call

* s/VIPCBufExtra/VisionIpcBufExtra/g

* use non blocking connect

* ui use non blocking connect

* Lower condition variable wait time

* Snapshot cleanup

* bump cereal

* bump cereal 
selfdrive/ui/paint.cc