Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion flutter/shell/platform/tizen/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ template("embedder") {
"//flutter/shell/platform/common:common_cpp",
"//flutter/shell/platform/common:common_cpp_accessibility",
"//flutter/shell/platform/common:common_cpp_input",
"//flutter/shell/platform/common:common_cpp_isolate_scope",
"//flutter/shell/platform/common:common_cpp_library_headers",
"//flutter/shell/platform/common/client_wrapper",
"//flutter/shell/platform/embedder:embedder_headers",
Expand Down
39 changes: 17 additions & 22 deletions flutter/shell/platform/tizen/tizen_renderer_egl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#endif
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <tbm_dummy_display.h>

#include "flutter/shell/platform/tizen/external_texture_pixel_egl.h"
#include "flutter/shell/platform/tizen/external_texture_surface_egl.h"
Expand Down Expand Up @@ -49,13 +48,12 @@ bool TizenRendererEgl::CreateSurface(void* render_target,
void* render_target_display,
int32_t width,
int32_t height) {
if (render_target_display) {
egl_display_ = eglGetDisplay(
reinterpret_cast<EGLNativeDisplayType>(render_target_display));
} else {
egl_display_ = eglGetDisplay(tbm_dummy_display_create());
if (!render_target_display) {
FT_LOG(Error) << "No native display to create an EGL display from.";
return false;
}

egl_display_ = eglGetDisplay(
reinterpret_cast<EGLNativeDisplayType>(render_target_display));
if (egl_display_ == EGL_NO_DISPLAY) {
PrintEGLError();
FT_LOG(Error) << "Could not get EGL display.";
Expand Down Expand Up @@ -92,24 +90,21 @@ bool TizenRendererEgl::CreateSurface(void* render_target,
{
const EGLint attribs[] = {EGL_NONE};

if (render_target_display) {
#ifdef USE_TCORE_WL
tizen_core_wl_native_egl_window_h egl_window = nullptr;
if (tizen_core_wl_egl_window_get_native_egl_window(
static_cast<tizen_core_wl_egl_window_h>(render_target),
&egl_window) != TIZEN_CORE_WL_ERROR_NONE) {
FT_LOG(Error) << "Could not get the native EGL window.";
return false;
}
tizen_core_wl_native_egl_window_h egl_window = nullptr;
if (tizen_core_wl_egl_window_get_native_egl_window(
static_cast<tizen_core_wl_egl_window_h>(render_target),
&egl_window) != TIZEN_CORE_WL_ERROR_NONE) {
FT_LOG(Error) << "Could not get the native EGL window.";
return false;
}
#else
const auto egl_window = ecore_wl2_egl_window_native_get(
static_cast<Ecore_Wl2_Egl_Window*>(render_target));
const auto egl_window = ecore_wl2_egl_window_native_get(
static_cast<Ecore_Wl2_Egl_Window*>(render_target));
#endif
egl_surface_ = eglCreateWindowSurface(
egl_display_, egl_config_,
reinterpret_cast<EGLNativeWindowType>(egl_window), attribs);
}

egl_surface_ = eglCreateWindowSurface(
egl_display_, egl_config_,
reinterpret_cast<EGLNativeWindowType>(egl_window), attribs);
if (egl_surface_ == EGL_NO_SURFACE) {
FT_LOG(Error) << "Could not create an onscreen window surface.";
return false;
Expand Down
6 changes: 0 additions & 6 deletions flutter/shell/platform/tizen/tizen_window_tcore_wl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,6 @@ void TizenWindowTcoreWl::RegisterEventHandlers() {
return;
}

char* keyname = nullptr;
tizen_core_wl_event_key_get_keyname(ev, &keyname);
char* keysymbol = nullptr;
tizen_core_wl_event_key_get_keysymbol(ev, &keysymbol);
char* compose = nullptr;
Expand Down Expand Up @@ -620,7 +618,6 @@ void TizenWindowTcoreWl::RegisterEventHandlers() {
self->view_delegate_->OnKey(keysymbol, compose, compose, modifiers,
keycode, dev_identifier, true);
}
free(keyname);
free(keysymbol);
free(compose);
free(dev_identifier);
Expand All @@ -640,8 +637,6 @@ void TizenWindowTcoreWl::RegisterEventHandlers() {
return;
}

char* keyname = nullptr;
tizen_core_wl_event_key_get_keyname(ev, &keyname);
char* keysymbol = nullptr;
tizen_core_wl_event_key_get_keysymbol(ev, &keysymbol);
char* compose = nullptr;
Expand All @@ -666,7 +661,6 @@ void TizenWindowTcoreWl::RegisterEventHandlers() {
self->view_delegate_->OnKey(keysymbol, compose, compose, modifiers,
keycode, nullptr, false);
}
free(keyname);
free(keysymbol);
free(compose);
});
Expand Down
Loading