check drmHandleEvent time
support simple text rendering mode

restructure the code, to make it easier to swtich between text rendering
and scene rendering modes.