Merge "To support for switching from a non-null surface/ surface texture to a null one, and vice versa. Fix for bug 5137445."