From 06938d6622cedb331fe679fc614c56dca2d63ea3 Mon Sep 17 00:00:00 2001 From: Swift Kim Date: Mon, 22 Nov 2021 11:22:50 +0900 Subject: [PATCH] Fix typos --- .../tizen/channels/platform_view_channel.cc | 1 + shell/platform/tizen/external_texture.h | 6 +++--- shell/platform/tizen/external_texture_surface_gl.h | 2 +- .../tizen/external_texture_surface_gl_linux.cc | 4 ++-- .../tizen/external_texture_surface_gl_tizen.cc | 14 +++++++------- .../tizen/flutter_tizen_texture_registrar.cc | 4 ++-- shell/platform/tizen/tizen_renderer.h | 2 +- shell/platform/tizen/tizen_renderer_ecore_wl2.cc | 9 +++------ shell/platform/tizen/tizen_renderer_ecore_wl2.h | 4 ++-- shell/platform/tizen/tizen_renderer_evas_gl.cc | 2 +- shell/platform/tizen/tizen_renderer_evas_gl.h | 2 +- 11 files changed, 24 insertions(+), 26 deletions(-) diff --git a/shell/platform/tizen/channels/platform_view_channel.cc b/shell/platform/tizen/channels/platform_view_channel.cc index 0f17b19dc81c8..4ca1e1d40b44f 100644 --- a/shell/platform/tizen/channels/platform_view_channel.cc +++ b/shell/platform/tizen/channels/platform_view_channel.cc @@ -281,4 +281,5 @@ void PlatformViewChannel::OnTouch( result->Success(); } + } // namespace flutter diff --git a/shell/platform/tizen/external_texture.h b/shell/platform/tizen/external_texture.h index 829271b211c77..1ead3f41d697e 100644 --- a/shell/platform/tizen/external_texture.h +++ b/shell/platform/tizen/external_texture.h @@ -24,7 +24,7 @@ enum class ExternalTextureExtensionType { kNone, kNativeSurface, kDmaBuffer }; struct ExternalTextureGLState { GLuint gl_texture; - ExternalTextureExtensionType gl_extention; + ExternalTextureExtensionType gl_extension; }; static std::atomic_long next_texture_id = {1}; @@ -32,11 +32,11 @@ static std::atomic_long next_texture_id = {1}; // An adaptation class of flutter engine and external texture interface. class ExternalTexture : public std::enable_shared_from_this { public: - ExternalTexture(ExternalTextureExtensionType gl_extention = + ExternalTexture(ExternalTextureExtensionType gl_extension = ExternalTextureExtensionType::kNone) : state_(std::make_unique()), texture_id_(next_texture_id++) { - state_->gl_extention = gl_extention; + state_->gl_extension = gl_extension; } virtual ~ExternalTexture() = default; diff --git a/shell/platform/tizen/external_texture_surface_gl.h b/shell/platform/tizen/external_texture_surface_gl.h index 7ed5ac23c9e26..8cb669703321e 100644 --- a/shell/platform/tizen/external_texture_surface_gl.h +++ b/shell/platform/tizen/external_texture_surface_gl.h @@ -15,7 +15,7 @@ namespace flutter { class ExternalTextureSurfaceGL : public ExternalTexture { public: ExternalTextureSurfaceGL( - ExternalTextureExtensionType gl_extention, + ExternalTextureExtensionType gl_extension, FlutterDesktopGpuBufferTextureCallback texture_callback, FlutterDesktopGpuBufferDestructionCallback destruction_callback, void* user_data); diff --git a/shell/platform/tizen/external_texture_surface_gl_linux.cc b/shell/platform/tizen/external_texture_surface_gl_linux.cc index 19e0671054119..d2840f7a169ed 100644 --- a/shell/platform/tizen/external_texture_surface_gl_linux.cc +++ b/shell/platform/tizen/external_texture_surface_gl_linux.cc @@ -12,11 +12,11 @@ namespace flutter { ExternalTextureSurfaceGL::ExternalTextureSurfaceGL( - ExternalTextureExtensionType gl_extention, + ExternalTextureExtensionType gl_extension, FlutterDesktopGpuBufferTextureCallback texture_callback, FlutterDesktopGpuBufferDestructionCallback destruction_callback, void* user_data) - : ExternalTexture(gl_extention), + : ExternalTexture(gl_extension), texture_callback_(texture_callback), destruction_callback_(destruction_callback), user_data_(user_data) {} diff --git a/shell/platform/tizen/external_texture_surface_gl_tizen.cc b/shell/platform/tizen/external_texture_surface_gl_tizen.cc index 8cff5949357d8..4a36b3c3245ca 100644 --- a/shell/platform/tizen/external_texture_surface_gl_tizen.cc +++ b/shell/platform/tizen/external_texture_surface_gl_tizen.cc @@ -45,11 +45,11 @@ static void OnCollectTexture(void* textureGL) { } ExternalTextureSurfaceGL::ExternalTextureSurfaceGL( - ExternalTextureExtensionType gl_extention, + ExternalTextureExtensionType gl_extension, FlutterDesktopGpuBufferTextureCallback texture_callback, FlutterDesktopGpuBufferDestructionCallback destruction_callback, void* user_data) - : ExternalTexture(gl_extention), + : ExternalTexture(gl_extension), texture_callback_(texture_callback), destruction_callback_(destruction_callback), user_data_(user_data) {} @@ -90,12 +90,12 @@ bool ExternalTextureSurfaceGL::PopulateTexture( #ifdef TIZEN_RENDERER_EVAS_GL EvasGLImage egl_src_image = nullptr; - if (state_->gl_extention == ExternalTextureExtensionType::kNativeSurface) { + if (state_->gl_extension == ExternalTextureExtensionType::kNativeSurface) { int attribs[] = {EVAS_GL_IMAGE_PRESERVED, GL_TRUE, 0}; egl_src_image = evasglCreateImageForContext( g_evas_gl, evas_gl_current_context_get(g_evas_gl), EVAS_GL_NATIVE_SURFACE_TIZEN, tbm_surface, attribs); - } else if (state_->gl_extention == ExternalTextureExtensionType::kDmaBuffer) { + } else if (state_->gl_extension == ExternalTextureExtensionType::kDmaBuffer) { FT_LOG(Error) << "EGL_EXT_image_dma_buf_import is not supported this renderer."; return false; @@ -127,13 +127,13 @@ bool ExternalTextureSurfaceGL::PopulateTexture( eglGetProcAddress("eglCreateImageKHR")); EGLImageKHR egl_src_image = nullptr; - if (state_->gl_extention == ExternalTextureExtensionType::kNativeSurface) { + if (state_->gl_extension == ExternalTextureExtensionType::kNativeSurface) { const EGLint attribs[] = {EGL_IMAGE_PRESERVED_KHR, EGL_TRUE, EGL_NONE, EGL_NONE}; egl_src_image = n_eglCreateImageKHR(eglGetCurrentDisplay(), EGL_NO_CONTEXT, EGL_NATIVE_SURFACE_TIZEN, tbm_surface, attribs); - } else if (state_->gl_extention == ExternalTextureExtensionType::kDmaBuffer) { + } else if (state_->gl_extension == ExternalTextureExtensionType::kDmaBuffer) { EGLint attribs[50]; int atti = 0; int plane_fd_ext[4] = {EGL_DMA_BUF_PLANE0_FD_EXT, EGL_DMA_BUF_PLANE1_FD_EXT, @@ -172,7 +172,7 @@ bool ExternalTextureSurfaceGL::PopulateTexture( } if (!egl_src_image) { - if (state_->gl_extention != ExternalTextureExtensionType::kNone) { + if (state_->gl_extension != ExternalTextureExtensionType::kNone) { FT_LOG(Error) << "eglCreateImageKHR failed with an error " << eglGetError() << " for texture ID: " << texture_id_; } else { diff --git a/shell/platform/tizen/flutter_tizen_texture_registrar.cc b/shell/platform/tizen/flutter_tizen_texture_registrar.cc index e88bc7db8efcc..1e6cbb079ceec 100644 --- a/shell/platform/tizen/flutter_tizen_texture_registrar.cc +++ b/shell/platform/tizen/flutter_tizen_texture_registrar.cc @@ -97,10 +97,10 @@ FlutterTizenTextureRegistrar::CreateExternalTexture( case kFlutterDesktopGpuBufferTexture: ExternalTextureExtensionType gl_extension = ExternalTextureExtensionType::kNone; - if (engine_->renderer()->IsSupportedExtention( + if (engine_->renderer()->IsSupportedExtension( "EGL_TIZEN_image_native_surface")) { gl_extension = ExternalTextureExtensionType::kNativeSurface; - } else if (engine_->renderer()->IsSupportedExtention( + } else if (engine_->renderer()->IsSupportedExtension( "EGL_EXT_image_dma_buf_import")) { gl_extension = ExternalTextureExtensionType::kDmaBuffer; } diff --git a/shell/platform/tizen/tizen_renderer.h b/shell/platform/tizen/tizen_renderer.h index 89cf5157152ca..18e391daa9fe3 100644 --- a/shell/platform/tizen/tizen_renderer.h +++ b/shell/platform/tizen/tizen_renderer.h @@ -57,7 +57,7 @@ class TizenRenderer { int32_t height, int32_t degree) = 0; virtual void SetPreferredOrientations(const std::vector& rotations) = 0; - virtual bool IsSupportedExtention(const char* name) = 0; + virtual bool IsSupportedExtension(const char* name) = 0; protected: explicit TizenRenderer(Geometry geometry, diff --git a/shell/platform/tizen/tizen_renderer_ecore_wl2.cc b/shell/platform/tizen/tizen_renderer_ecore_wl2.cc index 89d72425bad00..69517e4cf4a4a 100644 --- a/shell/platform/tizen/tizen_renderer_ecore_wl2.cc +++ b/shell/platform/tizen/tizen_renderer_ecore_wl2.cc @@ -384,7 +384,7 @@ bool TizenRendererEcoreWl2::SetupEglSurface() { FT_LOG(Error) << "ChooseEGLConfiguration() failed."; return false; } - egl_extention_str_ = eglQueryString(egl_display_, EGL_EXTENSIONS); + egl_extension_str_ = eglQueryString(egl_display_, EGL_EXTENSIONS); const EGLint context_attribs[] = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE}; egl_context_ = eglCreateContext(egl_display_, egl_config_, EGL_NO_CONTEXT, @@ -590,11 +590,8 @@ void TizenRendererEcoreWl2::SetPreferredOrientations( rotations.size()); } -bool TizenRendererEcoreWl2::IsSupportedExtention(const char* name) { - if (strstr(egl_extention_str_.c_str(), name)) { - return true; - } - return false; +bool TizenRendererEcoreWl2::IsSupportedExtension(const char* name) { + return strstr(egl_extension_str_.c_str(), name); } void TizenRendererEcoreWl2::SetTizenPolicyNotificationLevel(int level) { diff --git a/shell/platform/tizen/tizen_renderer_ecore_wl2.h b/shell/platform/tizen/tizen_renderer_ecore_wl2.h index c9316d68b533e..46cdc1403001e 100644 --- a/shell/platform/tizen/tizen_renderer_ecore_wl2.h +++ b/shell/platform/tizen/tizen_renderer_ecore_wl2.h @@ -49,7 +49,7 @@ class TizenRendererEcoreWl2 : public TizenRenderer { int32_t height, int32_t angle) override; void SetPreferredOrientations(const std::vector& rotations) override; - bool IsSupportedExtention(const char* name) override; + bool IsSupportedExtension(const char* name) override; private: bool InitializeRenderer(); @@ -85,7 +85,7 @@ class TizenRendererEcoreWl2 : public TizenRenderer { EGLContext egl_resource_context_ = EGL_NO_CONTEXT; EGLSurface egl_resource_surface_ = EGL_NO_SURFACE; - std::string egl_extention_str_; + std::string egl_extension_str_; tizen_policy* tizen_policy_ = nullptr; }; diff --git a/shell/platform/tizen/tizen_renderer_evas_gl.cc b/shell/platform/tizen/tizen_renderer_evas_gl.cc index 445c8d6bcd2ec..b9a23240ae635 100644 --- a/shell/platform/tizen/tizen_renderer_evas_gl.cc +++ b/shell/platform/tizen/tizen_renderer_evas_gl.cc @@ -767,7 +767,7 @@ void TizenRendererEvasGL::SetPreferredOrientations( rotations.size()); } -bool TizenRendererEvasGL::IsSupportedExtention(const char* name) { +bool TizenRendererEvasGL::IsSupportedExtension(const char* name) { return strcmp(name, "EGL_TIZEN_image_native_surface") == 0; } diff --git a/shell/platform/tizen/tizen_renderer_evas_gl.h b/shell/platform/tizen/tizen_renderer_evas_gl.h index 22f868cc44173..242939e08a484 100644 --- a/shell/platform/tizen/tizen_renderer_evas_gl.h +++ b/shell/platform/tizen/tizen_renderer_evas_gl.h @@ -47,7 +47,7 @@ class TizenRendererEvasGL : public TizenRenderer { int32_t height, int32_t angle) override; void SetPreferredOrientations(const std::vector& rotations) override; - bool IsSupportedExtention(const char* name) override; + bool IsSupportedExtension(const char* name) override; Evas_Object* GetImageHandle();