diff --git a/shell/platform/tizen/BUILD.gn b/shell/platform/tizen/BUILD.gn index f13844905e9f5..935eb4668ea74 100644 --- a/shell/platform/tizen/BUILD.gn +++ b/shell/platform/tizen/BUILD.gn @@ -154,7 +154,7 @@ template("embedder") { "channels/platform_channel.cc", "channels/settings_channel.cc", "channels/settings_channel_tizen.cc", - "external_texture_surface_gl.cc", + "external_texture_surface_gl_tizen.cc", "system_utils_tizen.cc", ] @@ -177,6 +177,7 @@ template("embedder") { "channels/platform_channel_stub.cc", "channels/settings_channel.cc", "channels/settings_channel_linux.cc", + "external_texture_surface_gl_linux.cc", "system_utils_linux.cc", ] } diff --git a/shell/platform/tizen/external_texture_surface_gl_linux.cc b/shell/platform/tizen/external_texture_surface_gl_linux.cc new file mode 100644 index 0000000000000..f6d3f31be3c68 --- /dev/null +++ b/shell/platform/tizen/external_texture_surface_gl_linux.cc @@ -0,0 +1,40 @@ +// 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. + +#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/common/public/flutter_texture_registrar.h" +#include "flutter/shell/platform/tizen/logger.h" + +namespace flutter { + +ExternalTextureSurfaceGL::ExternalTextureSurfaceGL( + FlutterDesktopGpuBufferTextureCallback texture_callback, + FlutterDesktopGpuBufferDestructionCallback destruction_callback, + void* user_data) + : ExternalTexture(), + texture_callback_(texture_callback), + destruction_callback_(destruction_callback), + user_data_(user_data) {} + +ExternalTextureSurfaceGL::~ExternalTextureSurfaceGL() { + FT_UNIMPLEMENTED(); +} + +bool ExternalTextureSurfaceGL::PopulateTexture( + size_t width, + size_t height, + FlutterOpenGLTexture* opengl_texture) { + FT_UNIMPLEMENTED(); + return false; +} + +void ExternalTextureSurfaceGL::OnDestruction() { + 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 56f837bf7b18b..7cebe6a98f55f 100644 --- a/shell/platform/tizen/external_texture_surface_gl.cc +++ b/shell/platform/tizen/external_texture_surface_gl_tizen.cc @@ -1,4 +1,4 @@ -// Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved. +// 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. diff --git a/shell/platform/tizen/flutter_tizen_texture_registrar.cc b/shell/platform/tizen/flutter_tizen_texture_registrar.cc index 53ad51616e2c9..5eb15ef2e0eae 100644 --- a/shell/platform/tizen/flutter_tizen_texture_registrar.cc +++ b/shell/platform/tizen/flutter_tizen_texture_registrar.cc @@ -8,9 +8,7 @@ #include #include "flutter/shell/platform/tizen/external_texture_pixel_gl.h" -#ifndef __X64_SHELL__ #include "flutter/shell/platform/tizen/external_texture_surface_gl.h" -#endif #include "flutter/shell/platform/tizen/flutter_tizen_engine.h" #include "flutter/shell/platform/tizen/logger.h" @@ -96,14 +94,12 @@ FlutterTizenTextureRegistrar::CreateExternalTexture( texture_info->pixel_buffer_config.callback, texture_info->pixel_buffer_config.user_data); break; -#ifndef __X64_SHELL__ case kFlutterDesktopGpuBufferTexture: return std::make_unique( texture_info->gpu_buffer_config.callback, texture_info->gpu_buffer_config.destruction_callback, texture_info->gpu_buffer_config.user_data); break; -#endif default: FT_LOG(Error) << "Invalid texture type."; return nullptr;