Skip to content

Commit

Permalink
Share egl context to egl resource context (#31)
Browse files Browse the repository at this point in the history
* This patch fixes an image display bug

Signed-off-by: Boram Bae <[email protected]>
  • Loading branch information
bbrto21 authored Jan 30, 2021
1 parent eeadd48 commit dbdb082
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions shell/platform/tizen/tizen_renderer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ bool TizenRenderer::OnPresent() {
return false;
}

if(received_rotation) {
if (received_rotation) {
SendRotationChangeDone();
received_rotation = false;
}
Expand Down Expand Up @@ -246,8 +246,8 @@ bool TizenRenderer::SetupEglSurface() {
return false;
}

egl_resource_context_ = eglCreateContext(egl_display_, egl_config_,
EGL_NO_CONTEXT, contextAttribs);
egl_resource_context_ =
eglCreateContext(egl_display_, egl_config_, egl_context_, contextAttribs);
if (EGL_NO_CONTEXT == egl_resource_context_) {
PrintEGLError();
return false;
Expand All @@ -272,15 +272,18 @@ bool TizenRenderer::SetupEglSurface() {
bool TizenRenderer::ChooseEGLConfiguration() {
// egl CONTEXT
EGLint configAttribs[] = {
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_RED_SIZE, 8,
EGL_GREEN_SIZE, 8,
EGL_BLUE_SIZE, 8,
EGL_ALPHA_SIZE, EGL_DONT_CARE,
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
EGL_SAMPLE_BUFFERS, EGL_DONT_CARE,
EGL_SAMPLES, EGL_DONT_CARE,
EGL_NONE};
// clang-format off
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_RED_SIZE, 8,
EGL_GREEN_SIZE, 8,
EGL_BLUE_SIZE, 8,
EGL_ALPHA_SIZE, EGL_DONT_CARE,
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
EGL_SAMPLE_BUFFERS, EGL_DONT_CARE,
EGL_SAMPLES, EGL_DONT_CARE,
EGL_NONE
// clang-format on
};

EGLint major = 0;
EGLint minor = 0;
Expand Down

0 comments on commit dbdb082

Please sign in to comment.