Refactor matrix initialization to onSurfaceChanged.