[Mesa-dev] [PATCH 1/2] egl_dri2: Add support for Tizen

Emil Velikov emil.l.velikov at gmail.com
Wed Apr 26 18:53:46 UTC 2017


On 26 April 2017 at 09:38, Mun, Gwan-gyeong <elongbug at gmail.com> wrote:
> Hi Emil,
>
> Thanks for review my patch,
>
> 2017-04-26 0:58 GMT+09:00 Daniel Stone <daniel at fooishbar.org>:
>> Hi,
>>
>> On 25 April 2017 at 17:03, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>>> From a quick look most of this code is copy/pasted from platform_wayland.c.
>>>
>>> At the same time, large portions of the android, gbm and wayland (not
>>> sure about x11) platforms are almost identical.
>>> With the biggest differences due to feature X implemented on platform
>>> A, but not on platform B.
>>>
>>> Before we proceed with adding new platforms we _really_ want to
>>> refactor and de-duplicate the existing code.
>>> Can you give that a stab - the common code can go in egl_dri2.c?
>>
>> There are also parts which are clearly not relevant, e.g. checks for
>> the surface being a pbuffer, when the surface-creation code fails if a
>> pbuffer surface is requested.
>>
>> Cheers,
>> Daniel
>
> As you mentioned, tizen_platform.c is copy & pasted from other platform.c .
> Especially I referenced implementation of __DRIimageLoaderExtension and
> __DRIdri2LoaderExtension from android, because tizen's window buffer management
> concept is similiar to andriod's.  and I also referenced software rasterization
> (__DRIswrastLoaderExtension) implementaion from wayland platform.c
>
>>> Before we proceed with adding new platforms we _really_ want to
>>> refactor and de-duplicate the existing code.
>>> Can you give that a stab - the common code can go in egl_dri2.c?
>
> If you agree, I want to refactor and de-duplication on android / tizen
> / wayland as first step.
> ( because a many parts of code are same on both tizen_platform.c and
> android_platform.c , so it looks easy as first step for removing of
> duplicate code. )
>
>From a very quick look one should be able to drop 300+ loc off
platform_android.c,  platform_drm.c and platform_wayland.c.
So I don't mind where we start, really ;-)

-Emil


More information about the mesa-dev mailing list