Ensure we don't touch shutdowned EglGraphicsController 79/318579/7
authorEunki, Hong <eunkiki.hong@samsung.com>
Wed, 2 Oct 2024 11:13:00 +0000 (20:13 +0900)
committerEunki Hong <eunkiki.hong@samsung.com>
Thu, 10 Oct 2024 01:46:08 +0000 (01:46 +0000)
commit80e7051c9a62828b8834e7ef175a7208caa8de2b
treeae16908c0570d755dcd4f14cc335d5f1a14382e4
parent42f48b3bad67ddb9c01a69ea282cf9878a7900a2
Ensure we don't touch shutdowned EglGraphicsController

Let we make IsShuttingDown() API as static,
so we can ask it without raw pointer of graphics controller.

Most of API in GLES::Resource hold the eglController as l-value.
So if someone try to get graphics controller after shutting down,
it might make some crash.

To avoid these kind of issue, let we ensure to call DiscardResource
only if graphics controller is not in shutting down.

TODO : native image should be called DiscardResource() even if it is shutting
downed. How can we ensure it?

Change-Id: I87ec5d96d8c12c054f00db346564f7bae8d5d3bb
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
15 files changed:
dali/internal/graphics/gles-impl/egl-graphics-controller.cpp
dali/internal/graphics/gles-impl/egl-graphics-controller.h
dali/internal/graphics/gles-impl/egl-sync-object.cpp
dali/internal/graphics/gles-impl/gles-graphics-buffer.cpp
dali/internal/graphics/gles-impl/gles-graphics-framebuffer.cpp
dali/internal/graphics/gles-impl/gles-graphics-pipeline-cache.cpp
dali/internal/graphics/gles-impl/gles-graphics-pipeline.cpp
dali/internal/graphics/gles-impl/gles-graphics-program.cpp
dali/internal/graphics/gles-impl/gles-graphics-shader.cpp
dali/internal/graphics/gles-impl/gles-graphics-texture.cpp
dali/internal/graphics/gles-impl/gles-sync-object.cpp
dali/internal/graphics/gles-impl/gles-sync-pool.cpp
dali/internal/graphics/gles-impl/gles2-graphics-memory.cpp
dali/internal/graphics/gles-impl/gles3-graphics-memory.cpp
dali/internal/graphics/tizen/egl-sync-implementation-tizen.cpp