[waffle] [PATCH 1/7] nacl: add supports_context_api implementation

Tapani Pälli tapani.palli at intel.com
Mon Feb 2 23:02:59 PST 2015



On 02/03/2015 12:59 AM, Chad Versace wrote:
> On 01/22/2015 11:59 PM, Tapani Pälli wrote:
>> Currently only OpenGL ES 2.0 is supported.
>>
>> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
>> ---
>>   src/waffle/nacl/nacl_display.c | 9 ++++++++-
>>   1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/waffle/nacl/nacl_display.c b/src/waffle/nacl/nacl_display.c
>> index 2d1162e..514d644 100644
>> --- a/src/waffle/nacl/nacl_display.c
>> +++ b/src/waffle/nacl/nacl_display.c
>> @@ -66,5 +66,12 @@ bool
>>   nacl_display_supports_context_api(struct wcore_display *wc_self,
>>                                     int32_t context_api)
>>   {
>> -    return false;
>> +    switch (context_api) {
>> +        case WAFFLE_CONTEXT_OPENGL_ES2:
>> +            return true;
>> +        default:
>> +            wcore_error_internal("api %#x not supported by nacl platform.",
>> +                                 context_api);
>> +            return false;
>> +    }
>>   }
>
> Almost. The return values are correct. But waffle_display_supports_context_api()
> should emit an error only if an error happens or if user supplies erroneous
> input. See cgl_display_supports_context_api() for a good example.
>

thanks, will fix


More information about the waffle mailing list