cogl-texture-2d: Optimise _cogl_texture_2d_is_pot
authorNeil Roberts <neil@linux.intel.com>
Thu, 20 May 2010 11:37:56 +0000 (12:37 +0100)
committerNeil Roberts <neil@linux.intel.com>
Thu, 20 May 2010 11:40:59 +0000 (12:40 +0100)
commit5b2311aed736ac90865f16466d273bf8f9d01a70
treea41c8a005c16f1913a6446c6d4045998ffcf579e
parentee7ebe096e3b7c0b0ce5dbadedc7674bb480266e
cogl-texture-2d: Optimise _cogl_texture_2d_is_pot

This takes the simple algorithm from here:

http://graphics.stanford.edu/~seander/bithacks.html#DetermineIfPowerOf2

This avoids a loop and is much faster.
clutter/cogl/cogl/cogl-texture-2d.c