Skip to content

Commit a7cda29

Browse files
committed
Fix code review issue
1.Rename static veriable(nextTextureId -> kNextTextureId) 2.Modify comment, make it more clear. 3.Rename function name(FlutterDesktopDestructionCallback)
1 parent b91ffe3 commit a7cda29

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

shell/platform/common/cpp/public/flutter_texture_registrar.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ typedef const FlutterDesktopGpuBuffer* (
6767
size_t height,
6868
void* user_data);
6969

70-
typedef void (*FlutterDesktopDestructionCallback)(void* user_data);
70+
typedef void (*FlutterDesktopGpuBufferDestructionCallback)(void* user_data);
7171

7272
// An object used to configure pixel buffer textures.
7373
typedef struct {
@@ -79,10 +79,10 @@ typedef struct {
7979

8080
// An object used to configure GPU buffer textures.
8181
typedef struct {
82-
// The callback used by the engine to copy the GPU buffer object.
82+
// The callback used by the engine to obtain the GPU buffer object.
8383
FlutterDesktopGpuBufferTextureCallback callback;
84-
// The callback used by the engine to desturction GPU buffer object.
85-
FlutterDesktopDestructionCallback destruction_callback;
84+
// The callback used by the engine to destruct GPU buffer object.
85+
FlutterDesktopGpuBufferDestructionCallback destruction_callback;
8686
// Opaque data that will get passed to the provided |callback|.
8787
void* user_data;
8888
} FlutterDesktopGPUBufferTextureConfig;

shell/platform/tizen/external_texture.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ struct ExternalTextureGLState {
2929
GLuint gl_texture;
3030
};
3131

32-
static std::atomic_long nextTextureId = {1};
32+
static std::atomic_long kNextTextureId = {1};
3333

3434
// An adaptation class of flutter engine and external texture interface.
3535
class ExternalTexture : public std::enable_shared_from_this<ExternalTexture> {
3636
public:
3737
ExternalTexture()
3838
: state_(std::make_unique<ExternalTextureGLState>()),
39-
texture_id_(nextTextureId++) {}
39+
texture_id_(kNextTextureId++) {}
4040
virtual ~ExternalTexture() = default;
4141

4242
/**

shell/platform/tizen/external_texture_surface_gl.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static void OnCollectTexture(void* textureGL) {
3737

3838
ExternalTextureSurfaceGL::ExternalTextureSurfaceGL(
3939
FlutterDesktopGpuBufferTextureCallback texture_callback,
40-
FlutterDesktopDestructionCallback destruction_callback,
40+
FlutterDesktopGpuBufferDestructionCallback destruction_callback,
4141
void* user_data)
4242
: ExternalTexture(),
4343
texture_callback_(texture_callback),

shell/platform/tizen/external_texture_surface_gl.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class ExternalTextureSurfaceGL : public ExternalTexture {
1414
public:
1515
ExternalTextureSurfaceGL(
1616
FlutterDesktopGpuBufferTextureCallback texture_callback,
17-
FlutterDesktopDestructionCallback destruction_callback,
17+
FlutterDesktopGpuBufferDestructionCallback destruction_callback,
1818
void* user_data);
1919

2020
virtual ~ExternalTextureSurfaceGL();
@@ -34,7 +34,7 @@ class ExternalTextureSurfaceGL : public ExternalTexture {
3434

3535
private:
3636
FlutterDesktopGpuBufferTextureCallback texture_callback_ = nullptr;
37-
FlutterDesktopDestructionCallback destruction_callback_ = nullptr;
37+
FlutterDesktopGpuBufferDestructionCallback destruction_callback_ = nullptr;
3838
void* user_data_ = nullptr;
3939
};
4040

0 commit comments

Comments
 (0)