Skip to content

Commit dbdb082

Browse files
authored
Share egl context to egl resource context (#31)
* This patch fixes an image display bug Signed-off-by: Boram Bae <[email protected]>
1 parent eeadd48 commit dbdb082

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

shell/platform/tizen/tizen_renderer.cc

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ bool TizenRenderer::OnPresent() {
6262
return false;
6363
}
6464

65-
if(received_rotation) {
65+
if (received_rotation) {
6666
SendRotationChangeDone();
6767
received_rotation = false;
6868
}
@@ -246,8 +246,8 @@ bool TizenRenderer::SetupEglSurface() {
246246
return false;
247247
}
248248

249-
egl_resource_context_ = eglCreateContext(egl_display_, egl_config_,
250-
EGL_NO_CONTEXT, contextAttribs);
249+
egl_resource_context_ =
250+
eglCreateContext(egl_display_, egl_config_, egl_context_, contextAttribs);
251251
if (EGL_NO_CONTEXT == egl_resource_context_) {
252252
PrintEGLError();
253253
return false;
@@ -272,15 +272,18 @@ bool TizenRenderer::SetupEglSurface() {
272272
bool TizenRenderer::ChooseEGLConfiguration() {
273273
// egl CONTEXT
274274
EGLint configAttribs[] = {
275-
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
276-
EGL_RED_SIZE, 8,
277-
EGL_GREEN_SIZE, 8,
278-
EGL_BLUE_SIZE, 8,
279-
EGL_ALPHA_SIZE, EGL_DONT_CARE,
280-
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
281-
EGL_SAMPLE_BUFFERS, EGL_DONT_CARE,
282-
EGL_SAMPLES, EGL_DONT_CARE,
283-
EGL_NONE};
275+
// clang-format off
276+
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
277+
EGL_RED_SIZE, 8,
278+
EGL_GREEN_SIZE, 8,
279+
EGL_BLUE_SIZE, 8,
280+
EGL_ALPHA_SIZE, EGL_DONT_CARE,
281+
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
282+
EGL_SAMPLE_BUFFERS, EGL_DONT_CARE,
283+
EGL_SAMPLES, EGL_DONT_CARE,
284+
EGL_NONE
285+
// clang-format on
286+
};
284287

285288
EGLint major = 0;
286289
EGLint minor = 0;

0 commit comments

Comments
 (0)