[Mesa-dev] [RFC PATCH 0/6] Refactor st_api and st/dri

Keith Whitwell keithw at vmware.com
Mon Apr 26 03:54:23 PDT 2010


On Sat, 2010-04-24 at 07:25 -0700, Jakob Bornecrantz wrote:
> Hi Chia-I et all
> 
> This Patch series does some minor refactoring in the st_api interface
> and some major one to st/dri.
> 
> The first patch drops the st_module struct from st_api. This is because it
> was overlapping the st_api struct. Both represent the API. It also drops some
> extra symbols and instead just exposes a single st_api_create_* function to
> get the st_api struct from the state tracker.
> 
> The following five patches refactor st/dri and removes some defines in favour
> of hooks on dri_screen. And instead of allocating a separate struct for
> st_manager and st_framebuffer makes them a base for dri_screen and
> dri_drawable. And finally moves the code from dri_st_api.c into dri_screen.c
> and dri_drawable.c.

I've got some issues with the naming of these various state-tracker
level components.

First up, API is crazy - this is not an application programming
interface.   Applications don't have a clue about this, it's buried deep
inside the driver.

Secondly, to label things st_XXX is probably misleading as it makes it
appear as if these components are universal to state trackers, or that
all state trackers must somehow use/conform to them.

Can you think about what this code is really implementing & try to come
up with a better set of names for these components?

Keith



More information about the mesa-dev mailing list