Merge "Fix a race that could cause GL commands to be executed from the wrong thread."