~oem-solutions-group/unity-2d/clutter-1.0

« back to all changes in this revision

Viewing changes to clutter/clutter-util.c

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2010-03-21 13:27:56 UTC
  • mto: (2.1.3 experimental)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20100321132756-nf8yd30yxo3zzwcm
Tags: upstream-1.2.2
ImportĀ upstreamĀ versionĀ 1.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * Lesser General Public License for more details.
19
19
 *
20
20
 * You should have received a copy of the GNU Lesser General Public
21
 
 * License along with this library; if not, write to the
22
 
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23
 
 * Boston, MA 02111-1307, USA.
 
21
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 
22
 *
 
23
 *
24
24
 */
25
25
 
26
26
/**
27
27
 * SECTION:clutter-util
28
 
 * @short_description: Misc utility functions.
 
28
 * @short_description: Utility functions
29
29
 *
30
 
 * Various misc utilility functions.
 
30
 * Various miscellaneous utilility functions.
31
31
 */
32
32
 
33
 
 
34
33
#include "clutter-util.h"
35
34
#include "clutter-main.h"
36
35
 
41
40
 * Calculates the nearest power of two, greater than or equal to @a.
42
41
 *
43
42
 * Return value: The nearest power of two, greater or equal to @a.
 
43
 *
 
44
 * Deprecated: 1.2
44
45
 */
45
 
int 
46
 
clutter_util_next_p2 (int a)
 
46
gint
 
47
clutter_util_next_p2 (gint a)
47
48
{
48
 
  int rval=1;
 
49
  int rval = 1;
49
50
 
50
 
  while(rval < a) 
 
51
  while (rval < a)
51
52
    rval <<= 1;
52
53
 
53
54
  return rval;