Skip to content

Commit 4849389

Browse files
committed
Fix code review issue
1 parent a7cda29 commit 4849389

File tree

5 files changed

+8
-22
lines changed

5 files changed

+8
-22
lines changed

shell/platform/common/cpp/client_wrapper/include/flutter/texture_registrar.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ class GpuBufferTexture {
5050
size_t height)>
5151
ObtainGpuBufferCallback;
5252

53-
typedef std::function<void(void* buffer)> DestructionGpuBufferCallback;
53+
typedef std::function<void(void* buffer)> DestructGpuBufferCallback;
5454

55-
// Creates a gpu buffer texture that uses the provided |copy_buffer_cb| to
55+
// Creates a gpu buffer texture that uses the provided |obtain_buffer_cb| to
5656
// retrieve the buffer.
5757
// As the callback is usually invoked from the render thread, the callee must
5858
// take care of proper synchronization. It also needs to be ensured that the
5959
// returned buffer isn't released prior to unregistering this texture.
6060
GpuBufferTexture(ObtainGpuBufferCallback obtain_buffer_callback,
61-
DestructionGpuBufferCallback destruction_callback)
61+
DestructGpuBufferCallback destruction_callback)
6262
: obtain_gpu_buffer_callback_(obtain_buffer_callback),
6363
destruct_gpu_buffer_callback_(destruction_callback),
6464
buffer_(nullptr) {}
@@ -79,7 +79,7 @@ class GpuBufferTexture {
7979

8080
private:
8181
const ObtainGpuBufferCallback obtain_gpu_buffer_callback_;
82-
const DestructionGpuBufferCallback destruct_gpu_buffer_callback_;
82+
const DestructGpuBufferCallback destruct_gpu_buffer_callback_;
8383
void* buffer_;
8484
};
8585

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ typedef struct {
8181
typedef struct {
8282
// The callback used by the engine to obtain the GPU buffer object.
8383
FlutterDesktopGpuBufferTextureCallback callback;
84-
// The callback used by the engine to destruct GPU buffer object.
84+
// The callback used by the engine to destruct the GPU buffer object.
8585
FlutterDesktopGpuBufferDestructionCallback destruction_callback;
8686
// Opaque data that will get passed to the provided |callback|.
8787
void* user_data;

shell/platform/tizen/external_texture.h

+3-11
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,23 @@
1212

1313
#ifdef TIZEN_RENDERER_EVAS_GL
1414
#undef EFL_BETA_API_SUPPORT
15-
#include <Ecore.h>
16-
#include <Elementary.h>
17-
#include <Evas_GL_GLES3_Helpers.h>
18-
extern Evas_GL* g_evas_gl;
19-
EVAS_GL_GLOBAL_GLES3_DECLARE();
15+
#include <Evas_GL.h>
2016
#else
21-
#include <EGL/egl.h>
22-
#include <EGL/eglext.h>
2317
#include <GLES2/gl2.h>
24-
#include <GLES2/gl2ext.h>
25-
#include <GLES3/gl32.h>
2618
#endif
2719

2820
struct ExternalTextureGLState {
2921
GLuint gl_texture;
3022
};
3123

32-
static std::atomic_long kNextTextureId = {1};
24+
static std::atomic_long next_texture_id = {1};
3325

3426
// An adaptation class of flutter engine and external texture interface.
3527
class ExternalTexture : public std::enable_shared_from_this<ExternalTexture> {
3628
public:
3729
ExternalTexture()
3830
: state_(std::make_unique<ExternalTextureGLState>()),
39-
texture_id_(kNextTextureId++) {}
31+
texture_id_(next_texture_id++) {}
4032
virtual ~ExternalTexture() = default;
4133

4234
/**

shell/platform/tizen/external_texture_pixel_gl.cc

-3
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,12 @@
66

77
#ifdef TIZEN_RENDERER_EVAS_GL
88
#undef EFL_BETA_API_SUPPORT
9-
#include <Ecore.h>
10-
#include <Elementary.h>
119
#include <Evas_GL_GLES3_Helpers.h>
1210
extern Evas_GL* g_evas_gl;
1311
EVAS_GL_GLOBAL_GLES3_DECLARE();
1412
#else
1513
#include <EGL/egl.h>
1614
#include <EGL/eglext.h>
17-
#include <GLES2/gl2.h>
1815
#include <GLES2/gl2ext.h>
1916
#include <GLES3/gl32.h>
2017
#endif

shell/platform/tizen/external_texture_surface_gl.cc

-3
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,12 @@
88

99
#ifdef TIZEN_RENDERER_EVAS_GL
1010
#undef EFL_BETA_API_SUPPORT
11-
#include <Ecore.h>
12-
#include <Elementary.h>
1311
#include <Evas_GL_GLES3_Helpers.h>
1412
extern Evas_GL* g_evas_gl;
1513
EVAS_GL_GLOBAL_GLES3_DECLARE();
1614
#else
1715
#include <EGL/egl.h>
1816
#include <EGL/eglext.h>
19-
#include <GLES2/gl2.h>
2017
#include <GLES2/gl2ext.h>
2118
#include <GLES3/gl32.h>
2219
#endif

0 commit comments

Comments
 (0)