From 25aebdacb9f0b008d2e124f07bdc33a5f463839f Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Tue, 22 Jun 2010 15:42:41 +0100 Subject: [PATCH] cogl-texture-pixmap-x11: don't always iterate all configs This makes get_fbconfig_for_depth stop iterating the configs once it has one with mipmaps support (or if glGenerateMipmap isn't available then it stops iterating after it finds any config). --- clutter/cogl/cogl/winsys/cogl-texture-pixmap-x11.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/clutter/cogl/cogl/winsys/cogl-texture-pixmap-x11.c b/clutter/cogl/cogl/winsys/cogl-texture-pixmap-x11.c index 5a1d275..da5dbef 100644 --- a/clutter/cogl/cogl/winsys/cogl-texture-pixmap-x11.c +++ b/clutter/cogl/cogl/winsys/cogl-texture-pixmap-x11.c @@ -341,6 +341,11 @@ get_fbconfig_for_depth (unsigned int depth, } found = i; + + /* If we've found a config that supports mipmaps then there's no + * need to keep looking for anything better. */ + if (!cogl_features_available (COGL_FEATURE_OFFSCREEN) || mipmap) + break; } if (found != n_elements) -- 1.6.3.3