toytoolkit: Make the window resizing optimization optional

Whether or not a shm pool is used for resizing is now configurable at
build time (--disable-resize-optimization).

[pq: removed an unnecessary hunk from the patch]
This commit is contained in:
Louis-Francis Ratté-Boulianne
2013-05-22 18:03:11 +03:00
committed by Kristian Høgsberg
parent a402b0567f
commit 6cd1de33ba
2 changed files with 9 additions and 0 deletions
+2
View File
@@ -1063,6 +1063,7 @@ shm_surface_prepare(struct toysurface *base, int dx, int dy,
if (leaf->cairo_surface)
cairo_surface_destroy(leaf->cairo_surface);
#ifdef USE_RESIZE_POOL
if (resize_hint && !leaf->resize_pool) {
/* Create a big pool to allocate from, while continuously
* resizing. Mmapping a new pool in the server
@@ -1073,6 +1074,7 @@ shm_surface_prepare(struct toysurface *base, int dx, int dy,
leaf->resize_pool = shm_pool_create(surface->display,
6 * 1024 * 1024);
}
#endif
rect.width = width;
rect.height = height;