golden: apply upstream changes to twrp-graphic.c