extract method

Change-Id: I95aacfa9dacd42936ca648ed42b55aa9ec50ebde
only render through OpenGL after successful context creation

Change-Id: I60ebceee2bf0eca1c7022e14fc43128347d682b5