Skip to content

Commit

Permalink
Remove ExternalTexture stub files (#164)
Browse files Browse the repository at this point in the history
* Remove ExternalTexture stub files

* Create a dummy external_texture_surface_gl_linux.cc
  • Loading branch information
swift-kim authored Aug 4, 2021
1 parent 1e7b2fa commit 0bc4485
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 58 deletions.
7 changes: 3 additions & 4 deletions shell/platform/tizen/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
]

Expand All @@ -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",
]
}
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/tizen/external_texture_pixel_gl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#ifdef TIZEN_RENDERER_EVAS_GL
#undef EFL_BETA_API_SUPPORT
#include <Evas_GL_GLES3_Helpers.h>
#include "tizen_evas_gl_helper.h"
extern Evas_GL* g_evas_gl;
EVAS_GL_GLOBAL_GLES3_DECLARE();
#else
Expand Down
29 changes: 0 additions & 29 deletions shell/platform/tizen/external_texture_pixel_gl_stub.cc

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#ifdef TIZEN_RENDERER_EVAS_GL
#undef EFL_BETA_API_SUPPORT
#include <Evas_GL_GLES3_Helpers.h>
#include "tizen_evas_gl_helper.h"
extern Evas_GL* g_evas_gl;
EVAS_GL_GLOBAL_GLES3_DECLARE();
#else
Expand All @@ -18,7 +18,6 @@ EVAS_GL_GLOBAL_GLES3_DECLARE();

#include <tbm_surface.h>

#include "flutter/shell/platform/common/public/flutter_texture_registrar.h"
#include "flutter/shell/platform/tizen/logger.h"

namespace flutter {
Expand Down
13 changes: 2 additions & 11 deletions shell/platform/tizen/tizen_evas_gl_helper.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -683,5 +676,3 @@ evgl_init(...)
*/

#endif

#endif // EMBEDDER_TIZEN_EVAS_GL_HELPER_H_
4 changes: 0 additions & 4 deletions shell/platform/tizen/tizen_renderer_evas_gl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@

#include "tizen_renderer_evas_gl.h"

#ifdef __X64_SHELL__
#include "tizen_evas_gl_helper.h"
#else
#include <Evas_GL_GLES3_Helpers.h>
#endif
Evas_GL* g_evas_gl = nullptr;
EVAS_GL_GLOBAL_GLES3_DEFINE();

Expand Down

0 comments on commit 0bc4485

Please sign in to comment.