HeadlessBackend seems to be part of the mbgl::gl namespace. Since OSMesaBackendImpl is only in the mbgl namespace this code does not compile. Since this file is in the mbgl/gl folder I think it makes sense to just put the whole thing in the mbgl::gl namespace.