| 8 | //#define DISABLE_AVATAR_LOADING_FOR_DEBUGGING |
| 9 | |
| 10 | static int NearestPowerOfTwo(int x) { |
| 11 | if (x > (1 << 30)) |
| 12 | return 1 << 30; |
| 13 | |
| 14 | if (x < 2) |
| 15 | return 2; |
| 16 | |
| 17 | int i; |
| 18 | for (i = 1; i < x; i <<= 1); |
| 19 | return i; |
| 20 | } |
| 21 | |
| 22 | static AvatarCache s_AvatarCacheSingleton; |
| 23 | AvatarCache* GetAvatarCache() { |