diff --git a/shell/platform/tizen/BUILD.gn b/shell/platform/tizen/BUILD.gn index baa854ccbf63f..e207aba0a93f5 100644 --- a/shell/platform/tizen/BUILD.gn +++ b/shell/platform/tizen/BUILD.gn @@ -119,6 +119,7 @@ template("embedder") { "channels/platform_view_channel.cc", "channels/settings_channel.cc", "channels/text_input_channel.cc", + "external_texture_pixel_gl.cc", "flutter_project_bundle.cc", "flutter_tizen.cc", "flutter_tizen_engine.cc", @@ -156,8 +157,7 @@ template("embedder") { "channels/app_control_channel.cc", "channels/platform_channel_tizen.cc", "channels/settings_channel_tizen.cc", - "external_texture_pixel_gl.cc", - "external_texture_surface_gl.cc", + "external_texture_surface_gl_tizen.cc", "system_utils_tizen.cc", ] @@ -180,8 +180,7 @@ template("embedder") { sources += [ "channels/platform_channel_linux.cc", "channels/settings_channel_linux.cc", - "external_texture_pixel_gl_stub.cc", - "external_texture_surface_gl_stub.cc", + "external_texture_surface_gl_linux.cc", "system_utils_linux.cc", ] } diff --git a/shell/platform/tizen/external_texture_pixel_gl.cc b/shell/platform/tizen/external_texture_pixel_gl.cc index 7d3ab6b2c42c6..b50f88ce3776e 100644 --- a/shell/platform/tizen/external_texture_pixel_gl.cc +++ b/shell/platform/tizen/external_texture_pixel_gl.cc @@ -6,7 +6,7 @@ #ifdef TIZEN_RENDERER_EVAS_GL #undef EFL_BETA_API_SUPPORT -#include +#include "tizen_evas_gl_helper.h" extern Evas_GL* g_evas_gl; EVAS_GL_GLOBAL_GLES3_DECLARE(); #else diff --git a/shell/platform/tizen/external_texture_pixel_gl_stub.cc b/shell/platform/tizen/external_texture_pixel_gl_stub.cc deleted file mode 100644 index e956879f13103..0000000000000 --- a/shell/platform/tizen/external_texture_pixel_gl_stub.cc +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2021 Samsung Electronics Co., Ltd. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "external_texture_pixel_gl.h" - -namespace flutter { - -ExternalTexturePixelGL::ExternalTexturePixelGL( - FlutterDesktopPixelBufferTextureCallback texture_callback, - void* user_data) - : ExternalTexture(), - texture_callback_(texture_callback), - user_data_(user_data) {} - -bool ExternalTexturePixelGL::PopulateTexture( - size_t width, - size_t height, - FlutterOpenGLTexture* opengl_texture) { - return CopyPixelBuffer(width, height); -} - -bool ExternalTexturePixelGL::CopyPixelBuffer(size_t& width, size_t& height) { - if (texture_callback_ && user_data_) { - return true; - } - return false; -} -} // namespace flutter diff --git a/shell/platform/tizen/external_texture_surface_gl_stub.cc b/shell/platform/tizen/external_texture_surface_gl_linux.cc similarity index 78% rename from shell/platform/tizen/external_texture_surface_gl_stub.cc rename to shell/platform/tizen/external_texture_surface_gl_linux.cc index 07f21e8673ae6..bced5d8446036 100644 --- a/shell/platform/tizen/external_texture_surface_gl_stub.cc +++ b/shell/platform/tizen/external_texture_surface_gl_linux.cc @@ -2,7 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-private-field" #include "external_texture_surface_gl.h" +#pragma clang diagnostic pop + +#include "flutter/shell/platform/tizen/logger.h" namespace flutter { @@ -16,23 +21,19 @@ ExternalTextureSurfaceGL::ExternalTextureSurfaceGL( user_data_(user_data) {} ExternalTextureSurfaceGL::~ExternalTextureSurfaceGL() { - state_.release(); + FT_UNIMPLEMENTED(); } bool ExternalTextureSurfaceGL::PopulateTexture( size_t width, size_t height, FlutterOpenGLTexture* opengl_texture) { - if (texture_callback_ && destruction_callback_ && user_data_) { - return true; - } + FT_UNIMPLEMENTED(); return false; } void ExternalTextureSurfaceGL::OnDestruction() { - if (destruction_callback_) { - destruction_callback_(user_data_); - } + FT_UNIMPLEMENTED(); } } // namespace flutter diff --git a/shell/platform/tizen/external_texture_surface_gl.cc b/shell/platform/tizen/external_texture_surface_gl_tizen.cc similarity index 98% rename from shell/platform/tizen/external_texture_surface_gl.cc rename to shell/platform/tizen/external_texture_surface_gl_tizen.cc index 0bce628f77a38..737e1ae57ee6c 100644 --- a/shell/platform/tizen/external_texture_surface_gl.cc +++ b/shell/platform/tizen/external_texture_surface_gl_tizen.cc @@ -6,7 +6,7 @@ #ifdef TIZEN_RENDERER_EVAS_GL #undef EFL_BETA_API_SUPPORT -#include +#include "tizen_evas_gl_helper.h" extern Evas_GL* g_evas_gl; EVAS_GL_GLOBAL_GLES3_DECLARE(); #else @@ -18,7 +18,6 @@ EVAS_GL_GLOBAL_GLES3_DECLARE(); #include -#include "flutter/shell/platform/common/public/flutter_texture_registrar.h" #include "flutter/shell/platform/tizen/logger.h" namespace flutter { diff --git a/shell/platform/tizen/tizen_evas_gl_helper.h b/shell/platform/tizen/tizen_evas_gl_helper.h index be5a0d84f36ca..6994c19033114 100644 --- a/shell/platform/tizen/tizen_evas_gl_helper.h +++ b/shell/platform/tizen/tizen_evas_gl_helper.h @@ -1,12 +1,5 @@ -// Copyright 2021 Samsung Electronics Co., Ltd. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// This file has same content as tizen's file(Evas_GL_GLES3_Helpers.h). -// https://docs.tizen.org/application/native/api/mobile/6.0/group__Evas__GL__GLES3__Helpers.html - -#ifndef EMBEDDER_TIZEN_EVAS_GL_HELPER_H_ -#define EMBEDDER_TIZEN_EVAS_GL_HELPER_H_ +// This file is a copy of Tizen's Evas_GL_GLES3_Helpers.h file. +// https://docs.tizen.org/application/native/api/wearable/5.5/group__Evas__GL__GLES3__Helpers.html /** * @file Evas_GL_GLES3_Helpers.h @@ -683,5 +676,3 @@ evgl_init(...) */ #endif - -#endif // EMBEDDER_TIZEN_EVAS_GL_HELPER_H_ diff --git a/shell/platform/tizen/tizen_renderer_evas_gl.cc b/shell/platform/tizen/tizen_renderer_evas_gl.cc index fef794a6e51a9..282d9c2fd98d2 100644 --- a/shell/platform/tizen/tizen_renderer_evas_gl.cc +++ b/shell/platform/tizen/tizen_renderer_evas_gl.cc @@ -4,11 +4,7 @@ #include "tizen_renderer_evas_gl.h" -#ifdef __X64_SHELL__ #include "tizen_evas_gl_helper.h" -#else -#include -#endif Evas_GL* g_evas_gl = nullptr; EVAS_GL_GLOBAL_GLES3_DEFINE();