[Mesa-dev] RFC: Whimsical renames and code motion

Kristian Høgsberg krh at bitplanet.net
Tue Oct 12 09:43:18 PDT 2010


Hi,

I wrote this patch series a while ago, but now that 7.9 is out I
thought I'd float it on the list to see what people think.  The first
couple of patches kill off glcore.h, which is no longer used for any
external interfaces, and pull the struct into mtypes.h.  The next
couple of patches massage it a bit to drop fields we don't use and
rename it and it's many typedefs to just struct gl_config.  The patch
series finishes with two patches to drop the GLframebuffer and
GLcontext typedefs and just use struct gl_framebuffer and struct
gl_context instead.  The last patch is 2MB, so I'll just point you to
the branch in my repo:

  http://cgit.freedesktop.org/~krh/mesa/log/?h=whimsical-renames

and this output:

[krh at hinata mesa]$ git log --oneline --shortstat origin/master..HEAD
8057432 Drop GLcontext typedef and use struct gl_context instead
 789 files changed, 5696 insertions(+), 5699 deletions(-)
8dd8750 Drop GLframebuffer typedef and just use struct gl_framebuffer
 54 files changed, 127 insertions(+), 128 deletions(-)
e7158d3 Rename GLvisual and __GLcontextModes to struct gl_config
 98 files changed, 176 insertions(+), 189 deletions(-)
4067d7a gl: Remove unused GLcontextModes fields
 8 files changed, 7 insertions(+), 48 deletions(-)
e63f0e4 Get rid of GL/internal/glcore.h
 11 files changed, 314 insertions(+), 193 deletions(-)

The last two renames are quite a mouthful, but I think they make a lot
of sense and makes the mesa types more consistent; consistent with
themselves (no other mesa structs have typedefs) and other code
(gallium doesn't typedef structs and neither does most of the dri
drivers (struct radeon_framebuffer, struct intel_context etc)).

Kristian


More information about the mesa-dev mailing list