Adding callback for surface creation in the recorder