bump mapnik-packaging, remove unnecessary view.make_active calls
This commit is contained in:
@@ -106,10 +106,7 @@ void HeadlessView::resize(int width, int height) {
|
||||
#if MBGL_USE_GLX
|
||||
x_pixmap = XCreatePixmap(x_display, DefaultRootWindow(x_display), width, height, 32);
|
||||
glx_pixmap = glXCreateGLXPixmap(x_display, x_info, x_pixmap);
|
||||
|
||||
make_active();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void HeadlessView::clear_buffers() {
|
||||
@@ -132,6 +129,8 @@ void HeadlessView::clear_buffers() {
|
||||
glDeleteRenderbuffersEXT(1, &fbo_depth_stencil);
|
||||
fbo_depth_stencil = 0;
|
||||
}
|
||||
|
||||
make_inactive();
|
||||
#endif
|
||||
|
||||
#if MBGL_USE_GLX
|
||||
|
||||
@@ -51,7 +51,7 @@ set -u
|
||||
NODE=$(which node)
|
||||
NPM=$(which npm)
|
||||
|
||||
MP_HASH="d58d6f18b99e5283b43940882da9ea18deea1227"
|
||||
MP_HASH="8239a894fecdfc001016a4669bc5ca289763048f"
|
||||
DIR_HASH=$(echo `pwd` | git hash-object --stdin)
|
||||
if [ ! -d 'mapnik-packaging/' ]; then
|
||||
git clone https://github.com/mapnik/mapnik-packaging.git
|
||||
|
||||
@@ -111,7 +111,6 @@ void Map::run() {
|
||||
// If the map rendering wasn't started asynchronously, we perform one render
|
||||
// *after* all events have been processed.
|
||||
if (!async) {
|
||||
prepare();
|
||||
render();
|
||||
}
|
||||
}
|
||||
@@ -147,12 +146,10 @@ void Map::cleanup() {
|
||||
void Map::cleanup(uv_async_t *async, int status) {
|
||||
Map *map = static_cast<Map *>(async->data);
|
||||
|
||||
map->view.make_active();
|
||||
map->painter.cleanup();
|
||||
}
|
||||
|
||||
void Map::terminate() {
|
||||
view.make_active();
|
||||
painter.terminate();
|
||||
}
|
||||
|
||||
@@ -189,8 +186,6 @@ void Map::terminate(uv_async_t *async, int status) {
|
||||
#pragma mark - Setup
|
||||
|
||||
void Map::setup() {
|
||||
view.make_active();
|
||||
|
||||
painter.setup();
|
||||
}
|
||||
|
||||
@@ -525,8 +520,6 @@ void Map::updateRenderState() {
|
||||
}
|
||||
|
||||
void Map::prepare() {
|
||||
view.make_active();
|
||||
|
||||
// Update transform transitions.
|
||||
animationTime = util::now();
|
||||
if (transform.needsTransition()) {
|
||||
@@ -544,11 +537,11 @@ void Map::prepare() {
|
||||
spriteAtlas->update(*getSprite());
|
||||
|
||||
updateTiles();
|
||||
|
||||
view.make_inactive();
|
||||
}
|
||||
|
||||
void Map::render() {
|
||||
view.make_active();
|
||||
|
||||
#if defined(DEBUG)
|
||||
std::vector<std::string> debug;
|
||||
#endif
|
||||
@@ -583,6 +576,8 @@ void Map::render() {
|
||||
}
|
||||
|
||||
glFlush();
|
||||
|
||||
view.make_inactive();
|
||||
}
|
||||
|
||||
void Map::renderLayers(std::shared_ptr<StyleLayerGroup> group) {
|
||||
|
||||
@@ -91,7 +91,9 @@ TEST_P(HeadlessTest, render) {
|
||||
map.run();
|
||||
|
||||
const std::unique_ptr<uint32_t[]> pixels(new uint32_t[width * height]);
|
||||
map.view.make_active();
|
||||
glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels.get());
|
||||
map.view.make_inactive();
|
||||
|
||||
const std::string image = util::compress_png(width, height, pixels.get(), true);
|
||||
util::write_file(actual_image, image);
|
||||
|
||||
Reference in New Issue
Block a user