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
Refactor based on comments
1.Remove not used file.
2.Rename define of head file.
2.Rename of variable.
  • Loading branch information
xiaowei-guan committed May 25, 2021
commit 4a56f3a5a96940145b744da28366f57fbe9e9b1b
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ int64_t TextureRegistrarImpl::RegisterTexture(TextureVariant* texture) {
return buffer;
};

info.gpu_buffer_config.destructionCallback = [](void* user_data) -> void {
info.gpu_buffer_config.destruction_callback = [](void* user_data) -> void {
auto texture = static_cast<GpuBufferTexture*>(user_data);
texture->Destruction();
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ typedef struct {
// The callback used by the engine to copy the GPU buffer object.
FlutterDesktopGpuBufferTextureCallback callback;
// The callback used by the engine to desturction GPU buffer object.
FlutterDesktopDestructionCallback destructionCallback;
FlutterDesktopDestructionCallback destruction_callback;
// Opaque data that will get passed to the provided |callback|.
void* user_data;
} FlutterDesktopGPUBufferTextureConfig;
Expand Down
6 changes: 3 additions & 3 deletions shell/platform/tizen/external_texture.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_TIZEN_EXTERNAL_TEXTURE_H_
#define FLUTTER_SHELL_PLATFORM_TIZEN_EXTERNAL_TEXTURE_H_
#ifndef EMBEDDER_EXTERNAL_TEXTURE_H_
#define EMBEDDER_EXTERNAL_TEXTURE_H_

#include <atomic>
#include <memory>
Expand Down Expand Up @@ -54,4 +54,4 @@ class ExternalTexture : public std::enable_shared_from_this<ExternalTexture> {
const long texture_id_{0};
};

#endif // FLUTTER_SHELL_PLATFORM_TIZEN_EXTERNAL_TEXTURE_GL_H_
#endif // EMBEDDER_EXTERNAL_TEXTURE_H_
6 changes: 3 additions & 3 deletions shell/platform/tizen/external_texture_pixel_gl.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_TIZEN_EXTERNAL_TEXTURE_PIXEL_GL_H
#define FLUTTER_SHELL_PLATFORM_TIZEN_EXTERNAL_TEXTURE_PIXEL_GL_H
#ifndef EMBEDDER_EXTERNAL_TEXTURE_PIXEL_GL_H
#define EMBEDDER_EXTERNAL_TEXTURE_PIXEL_GL_H

#include <memory>

Expand Down Expand Up @@ -31,4 +31,4 @@ class ExternalTexturePixelGL : public ExternalTexture {
void* user_data_ = nullptr;
};

#endif // FLUTTER_SHELL_PLATFORM_TIZEN_EXTERNAL_TEXTURE_PIXEL_GL_H
#endif // EMBEDDER_EXTERNAL_TEXTURE_PIXEL_GL_H
1 change: 0 additions & 1 deletion shell/platform/tizen/external_texture_surface_gl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ bool ExternalTextureSurfaceGL::PopulateTexture(
opengl_texture->format = GL_RGBA8;
opengl_texture->destruction_callback = (VoidCallback)OnCollectTexture;
auto* weak_texture = new std::weak_ptr<ExternalTexture>(shared_from_this());
// Abandon ownership of tbm_surface
opengl_texture->user_data = weak_texture;
opengl_texture->width = width;
opengl_texture->height = height;
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 @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_TIZEN_EXTERNAL_TEXTURE_SURFACE_GL_H_
#define FLUTTER_SHELL_PLATFORM_TIZEN_EXTERNAL_TEXTURE_SURFACE_GL_H_
#ifndef EMBEDDER_EXTERNAL_TEXTURE_SURFACE_GL_H_
#define EMBEDDER_EXTERNAL_TEXTURE_SURFACE_GL_H_

#include "flutter/shell/platform/common/cpp/public/flutter_texture_registrar.h"
#include "flutter/shell/platform/embedder/embedder.h"
Expand Down Expand Up @@ -39,4 +39,4 @@ class ExternalTextureSurfaceGL : public ExternalTexture {
void* user_data_ = nullptr;
};

#endif // FLUTTER_SHELL_PLATFORM_TIZEN_EXTERNAL_TEXTURE_SURFACE_GL_H_
#endif // EMBEDDER_EXTERNAL_TEXTURE_SURFACE_GL_H_
2 changes: 1 addition & 1 deletion shell/platform/tizen/flutter_tizen_texture_registrar.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ FlutterTizenTextureRegistrar::CreateExternalTexture(
case kFlutterDesktopGpuBufferTexture:
return std::make_unique<ExternalTextureSurfaceGL>(
texture_info->gpu_buffer_config.callback,
texture_info->gpu_buffer_config.destructionCallback,
texture_info->gpu_buffer_config.destruction_callback,
texture_info->gpu_buffer_config.user_data);
break;
}
Expand Down
8 changes: 4 additions & 4 deletions shell/platform/tizen/flutter_tizen_texture_registrar.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Copyright 2020 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.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_WINDOWS_TEXTURE_REGISTRAR_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_WINDOWS_TEXTURE_REGISTRAR_H_
#ifndef EMBEDDER_FLUTTER_TIZEN_TEXTURE_REGISTRAR_H_
#define EMBEDDER_FLUTTER_TIZEN_TEXTURE_REGISTRAR_H_

#include <memory>
#include <mutex>
Expand Down Expand Up @@ -50,4 +50,4 @@ class FlutterTizenTextureRegistrar {
std::mutex map_mutex_;
};

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_WINDOWS_TEXTURE_REGISTRAR_H_
#endif // EMBEDDER_FLUTTER_TIZEN_TEXTURE_REGISTRAR_H_
45 changes: 0 additions & 45 deletions shell/platform/tizen/public/flutter_tizen_texture_registrar.h

This file was deleted.