OSDN Git Service

egl/display: only detect the platform once
authorEric Engestrom <eric@engestrom.ch>
Thu, 15 Jun 2017 22:53:54 +0000 (23:53 +0100)
committerAndres Gomez <agomez@igalia.com>
Wed, 28 Jun 2017 17:17:13 +0000 (20:17 +0300)
commitf9c7c9f48acd85ce759262fd40d9b11277bbc2b2
tree41d5d319f366ac0705c62392cb29aef5ce40436e
parent3700dc5f9719313aabbace50eb7c2f4009906fe5
egl/display: only detect the platform once

My refactor missed the fact that `native_platform` is static.
Add the proper guard around the detection code, as it might not be
necessary, and only print the debug message when a detection was
actually performed.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101252
Fixes: 7adb9b094894a512c019 ("egl/display: remove unnecessary code and
                              make it easier to read")
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 4ca9ae587c083b6f03feb65b4ce84929109d5d59)
src/egl/main/egldisplay.c