don't set the window title on every frame

this is a significant performance penalty, at least on OS X, and drops our frame rate below 60fps on even simple scenes. instead of showing the position of the map in the window, we should display it elsewhere
This commit is contained in:
Konstantin Käfer
2014-12-03 11:59:39 +01:00
parent 82f3574d09
commit dbdc64592c

View File

@@ -263,12 +263,6 @@ void GLFWView::notify() {
void GLFWView::swap() {
glfwPostEmptyEvent();
double lon, lat, zoom;
map->getLonLatZoom(lon, lat, zoom);
const double bearing = map->getBearing();
const std::string title = mbgl::util::sprintf<128>("Mapbox GL – %.2f/%.6f/%.6f/%.1f", zoom, lat, lon, bearing);
glfwSetWindowTitle(window, title.c_str());
}
void GLFWView::notify_map_change(mbgl::MapChange /*change*/, mbgl::timestamp /*delay*/) {