[Libva] [android-build v2 3/3] android-test: compile tests for all android versions
Charles, Daniel
daniel.charles at intel.com
Tue Aug 21 09:10:51 PDT 2012
On Tue, Aug 21, 2012 at 6:52 AM, Negreanu Marius <groleo at gmail.com> wrote:
> On Tue, Aug 21, 2012 at 12:33 AM, Gwenole Beauchesne <gb.devel at gmail.com> wrote:
>> Hi,
>>
>> 2012/8/17 Daniel Charles <daniel.charles at intel.com>:
>>> +#ifdef ANDROID_PRE_JB
>>> #include <surfaceflinger/ISurfaceComposer.h>
>>> #include <surfaceflinger/Surface.h>
>>> #include <surfaceflinger/ISurface.h>
>>> #include <surfaceflinger/SurfaceComposerClient.h>
>>> +#elif ANDROID_JB
>>> +#include <gui/ISurfaceComposer.h>
>>> +#include <gui/Surface.h>
>>> +#include <gui/ISurface.h>
>>> +#include <gui/SurfaceComposerClient.h>
>>> +#endif
>>> #include <binder/MemoryHeapBase.h>
>>
>
> An observation here is that only the directory names changed, not the
> header names.
> This means the #ifdefs can be dropped and handle the directory inside
> the Android.mk by
> setting the LOCAL_C_INCLUDES appropriately.
>
On Android ICS and before it seems that the convention was to use the
LOCAL_C_INCLUDES up to the include path and let the headers go deeper
on the directory tree as it is right now. On JB this "rule" is not
followed on some other projects within Android. This approach will
make the code look cleaner without so many #ifdefs.
I will keep the macros as currently defined and if the CHECK_VERSION
is still a concern I can address it. I don't see much benefit on
changing the macro to CHECK_VERSION if it is not going to be used on
any cpp file.
I'll resubmit this patch.
--
Daniel.
>
>
>> I would prefer a more generic ANDROID_CHECK_VERSION() macro. e.g.
>> #if ANDROID_CHECK_VERSION(4,1,0)
>> ...
>> #else
>> ...
>> #endif
>>
>> by probably decomposing PLATFORM_VERSION into major/minor/micro.
>>
>> Thanks,
>> Gwenole.
>> _______________________________________________
>> Libva mailing list
>> Libva at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/libva
>
>
>
> --
> Regards!
> http://groleo.wordpress.com
More information about the Libva
mailing list