hwc: modify the functions with the new hwc api