This function doesn't need the wl_resource anymore. In the failure paths, wlr_buffer_unlock in surface_apply_damage will take care of sending wl_buffer.release.