This approach is more backwards-compatible than the previous attempt. The onDetachedFromWindow case is unchanged from the "classic" GLSurfaceView behavior, except that we don't throw a NPE if the renderer has never been set. Change-Id: Ia8103a73366ddb13be44f16b789c929e75ddc792