Skip to content

Commit

Permalink
Create a dummy external_texture_surface_gl_linux.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
swift-kim committed Aug 4, 2021
1 parent 5f3dd22 commit 6afcb6a
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 6 deletions.
3 changes: 2 additions & 1 deletion shell/platform/tizen/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]

Expand All @@ -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",
]
}
Expand Down
39 changes: 39 additions & 0 deletions shell/platform/tizen/external_texture_surface_gl_linux.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// 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/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
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions shell/platform/tizen/flutter_tizen_texture_registrar.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
#include <mutex>

#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"

Expand Down Expand Up @@ -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<ExternalTextureSurfaceGL>(
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;
Expand Down

0 comments on commit 6afcb6a

Please sign in to comment.