Re: [PATCH] The pot() function may be hard to understand. Add comment.
Homer Hsing <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <CAGsvmqX9Gy6k6FDZrF4nO7JM3x9BMiUYaiwcCxnymrB__eOMbg@mail.gmail.com> |
From d6330f4af88a02d39e39eaa13de94e48b1767c8e Mon Sep 17 00:00:00 2001 From: Homer Hsing <[email protected]> Date: Wed, 30 May 2012 14:06:02 +0800 Subject: [PATCH] The pot() function may be hard to understand. Add comment. > Why not simply do this in words? Something like: > > /* Round up to the next power of two */ > > Maarten To Maarten: good idea, nice --- src/cairo-clip-boxes.c | 1 + src/drm/cairo-drm-intel.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/cairo-clip-boxes.c b/src/cairo-clip-boxes.c index bbb4197..7b93de6 100644 --- a/src/cairo-clip-boxes.c +++ b/src/cairo-clip-boxes.c @@ -52,6 +52,7 @@ #include "cairo-composite-rectangles-private.h" #include "cairo-region-private.h" +/* round up to the next power of two */ static inline int pot (int v) { diff --git a/src/drm/cairo-drm-intel.c b/src/drm/cairo-drm-intel.c index d45155e..6c407d2 100644 --- a/src/drm/cairo-drm-intel.c +++ b/src/drm/cairo-drm-intel.c @@ -273,6 +273,7 @@ intel_bo_wait (const intel_device_t *device, const intel_bo_t *bo) return ret == 0; } +/* round up to the next power of two */ static inline int pot (int v) { -- 1.7.9.5 -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo