Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3b7f88c
Add platfrom surface buffer structor
xiaowei-guan May 8, 2021
f6d12da
Texture api change(draft)
xiaowei-guan May 11, 2021
7874e37
Merge branch 'flutter-2.0.1-tizen' into flutter-2.0.1-tizen-texture-2
xiaowei-guan May 11, 2021
3f7dabf
Revert code to original
xiaowei-guan May 11, 2021
08aaed6
Support GPU buffer texture
xiaowei-guan May 13, 2021
f3bf70f
Change file permission
xiaowei-guan May 13, 2021
4abc488
Add FlutterDesktopGpuBufferTextureConfig in FlutterDesktopTextureInfo.
xiaowei-guan May 14, 2021
77442be
Add buffer parameter at Destruction callback
xiaowei-guan May 18, 2021
4b8106c
Change class name ExternalTextureGL to ExternalTextureSurfaceGL
xiaowei-guan May 19, 2021
18ab87f
Remove not used code
xiaowei-guan May 20, 2021
f792f4e
Fix wild pointer issue
xiaowei-guan May 21, 2021
3576fd8
Convert unique_ptr to shared_ptr when create external texture
xiaowei-guan May 24, 2021
624b0d7
Merge branch 'flutter-2.0.1-tizen' into flutter-2.0.1-tizen-texture-2
xiaowei-guan May 24, 2021
0f5f923
Code format
xiaowei-guan May 24, 2021
240302a
Fix arm64 build error
xiaowei-guan May 24, 2021
c6b1970
Remove not used file
xiaowei-guan May 24, 2021
275201f
Remove unnecessary headers
xiaowei-guan May 25, 2021
4a56f3a
Refactor based on comments
xiaowei-guan May 25, 2021
d662053
Refactor based on comments
xiaowei-guan May 25, 2021
b91ffe3
Fix code review issue
xiaowei-guan May 26, 2021
a7cda29
Fix code review issue
xiaowei-guan May 26, 2021
4849389
Fix code review issue
xiaowei-guan May 26, 2021
00afe06
Remove warning log
xiaowei-guan May 27, 2021
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
Prev Previous commit
Next Next commit
Change class name ExternalTextureGL to ExternalTextureSurfaceGL
Class ExternamTextureSurfaceGL handle tbm surface texture render.
  • Loading branch information
xiaowei-guan committed May 19, 2021
commit 4b8106c83aa0bd8d18fbad5ce09e6b9343f80d36
10 changes: 5 additions & 5 deletions shell/platform/tizen/external_texture_surface_gl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ EVAS_GL_GLOBAL_GLES3_DECLARE();

#include "flutter/shell/platform/tizen/tizen_log.h"

void ExternalTextureGL::OnCollectTexture(void* textureGL) {
ExternalTextureGL* externalTextureGL = (ExternalTextureGL*)textureGL;
void ExternalTextureSurfaceGL::OnCollectTexture(void* textureGL) {
ExternalTextureSurfaceGL* externalTextureGL = (ExternalTextureSurfaceGL*)textureGL;
externalTextureGL->destruction_callback_(externalTextureGL->user_data_);
}

ExternalTextureGL::ExternalTextureGL(
ExternalTextureSurfaceGL::ExternalTextureSurfaceGL(
FlutterDesktopGpuBufferTextureCallback texture_callback,
FlutterDesktopDestructionCallback destruction_callback, void* user_data)
: ExternalTexture(),
Expand All @@ -39,14 +39,14 @@ ExternalTextureGL::ExternalTextureGL(
destruction_callback_(destruction_callback),
user_data_(user_data) {}

ExternalTextureGL::~ExternalTextureGL() {
ExternalTextureSurfaceGL::~ExternalTextureSurfaceGL() {
if (state_->gl_texture != 0) {
glDeleteTextures(1, &state_->gl_texture);
}
state_.release();
}

bool ExternalTextureGL::PopulateTexture(size_t width, size_t height,
bool ExternalTextureSurfaceGL::PopulateTexture(size_t width, size_t height,
FlutterOpenGLTexture* opengl_texture) {
const FlutterDesktopGpuBuffer* gpu_buffer =
texture_callback_(width, height, user_data_);
Expand Down
6 changes: 3 additions & 3 deletions shell/platform/tizen/external_texture_surface_gl.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
#include "flutter/shell/platform/tizen/external_texture.h"

// An adaptation class of flutter engine and external texture interface.
class ExternalTextureGL : public ExternalTexture {
class ExternalTextureSurfaceGL : public ExternalTexture {
public:
ExternalTextureGL(FlutterDesktopGpuBufferTextureCallback texture_callback,
ExternalTextureSurfaceGL(FlutterDesktopGpuBufferTextureCallback texture_callback,
FlutterDesktopDestructionCallback destruction_callback,
void* user_data);

virtual ~ExternalTextureGL();
virtual ~ExternalTextureSurfaceGL();

/**
* Returns the unique id for the ExternalTextureGL instance.
Expand Down
3 changes: 2 additions & 1 deletion shell/platform/tizen/flutter_tizen_texture_registrar.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <mutex>

#include "flutter/shell/platform/tizen/external_texture_pixel_gl.h"
#include "flutter/shell/platform/tizen/external_texture_surface_gl.h"
#include "flutter/shell/platform/tizen/flutter_tizen_engine.h"
#include "flutter/shell/platform/tizen/tizen_log.h"

Expand Down Expand Up @@ -38,7 +39,7 @@ int64_t FlutterTizenTextureRegistrar::RegisterTexture(
FT_LOGE("Invalid gpu buffer texture callback.");
return -1;
}
texture_gl = std::make_unique<ExternalTextureGL>(
texture_gl = std::make_unique<ExternalTextureSurfaceGL>(
texture_info->gpu_buffer_config.callback,
texture_info->gpu_buffer_config.destructionCallback,
texture_info->gpu_buffer_config.user_data);
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/tizen/flutter_tizen_texture_registrar.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <mutex>
#include <unordered_map>

#include "flutter/shell/platform/tizen/external_texture_surface_gl.h"
#include "flutter/shell/platform/tizen/external_texture.h"

class FlutterTizenEngine;

Expand Down