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:
@@ -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*/) {
|
||||
|
||||
Reference in New Issue
Block a user