glFlushMappedNamedBufferRange(pbo.pbo, 0, dinfo.image_width * dinfo.image_height + chroma_width * chroma_height * 2);
glMemoryBarrier(GL_PIXEL_BUFFER_BARRIER_BIT);
pbo.upload_done = RefCountedGLsync(GL_SYNC_GPU_COMMANDS_COMPLETE, /*flags=*/0);
+ glFlush();
frame->uploaded_ui_thread = pbo.upload_done;
frame->uploaded_interpolation = pbo.upload_done;
global_pbo_pool->release_pbo(move(pbo));
lock_guard<mutex> lock(cache_mu);
PendingDecode decode;
decode.frame = std::move(frame);
+ decode.fade_alpha = 0.0f;
pending_decodes.push_back(decode);
any_pending_decodes.notify_all();
}