From 6703eafdbbdf86908b5fb7323b9c3b95614e18c7 Mon Sep 17 00:00:00 2001 From: Chandan Padhi Date: Fri, 6 Jan 2023 18:44:54 +0530 Subject: [PATCH] Remove gl_current_context_efl.cc GetTextureIdFromTexture is no longer used as SharedMailboxManager has been removed. This commit moves GLGetCurentContext to gl_shared_context_efl.cc and removes gl_current_context_efl.cc. Change-Id: I5495ef311b0fa1e707fe6cd273d8206871e2f4c4 Signed-off-by: Chandan Padhi --- .../rwhv_aura_offscreen_helper_efl.cc | 4 --- .../chromium_impl/ui/gl/gl_current_context_efl.cc | 33 ---------------------- .../chromium_impl/ui/gl/gl_shared_context_efl.cc | 20 +++++++++++-- tizen_src/chromium_impl/ui/ui_efl.gni | 1 - 4 files changed, 17 insertions(+), 41 deletions(-) delete mode 100644 tizen_src/chromium_impl/ui/gl/gl_current_context_efl.cc diff --git a/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.cc b/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.cc index 8b5be5b..2ef4049 100644 --- a/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.cc +++ b/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.cc @@ -39,10 +39,6 @@ namespace content { -// Defined in gl_current_context_efl.cc because of conflicts of -// texture_manager.h with efl GL API wrappers. -extern GLuint GetTextureIdFromTexture(gpu::TextureBase* texture); - RWHVAuraOffscreenHelperEfl::RWHVAuraOffscreenHelperEfl( RenderWidgetHostViewAura* rwhva, WebContents* web_contents) diff --git a/tizen_src/chromium_impl/ui/gl/gl_current_context_efl.cc b/tizen_src/chromium_impl/ui/gl/gl_current_context_efl.cc deleted file mode 100644 index 2e8fbee..0000000 --- a/tizen_src/chromium_impl/ui/gl/gl_current_context_efl.cc +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2014 Samsung Electronics. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/gl/gl_export.h" -#include "ui/gl/gl_implementation.h" -#include "gpu/command_buffer/service/texture_manager.h" - -using namespace gl; - -extern void* GLGetCurentContext() { - // Temprorarily load corresponding gl library and shutdown for - // later correct initialization. - // Chromium gl system is not initialized yet and evas gl doesn't - // expose "GetCurrentContext" or "GetNativeContextHandle" API. - base::NativeLibrary library = - LoadLibraryAndPrintError("libEGL.so.1"); - typedef EGLContext (*eglGetCurrentContextProc)(void); - - eglGetCurrentContextProc proc = reinterpret_cast( - base::GetFunctionPointerFromNativeLibrary( - library, "eglGetCurrentContext")); - - void* handle = proc(); - base::UnloadNativeLibrary(library); - return handle; -} - -namespace content { -GL_EXPORT GLuint GetTextureIdFromTexture(gpu::TextureBase* texture) { - return texture->service_id(); -} -} diff --git a/tizen_src/chromium_impl/ui/gl/gl_shared_context_efl.cc b/tizen_src/chromium_impl/ui/gl/gl_shared_context_efl.cc index 84831f9..a3ca456 100644 --- a/tizen_src/chromium_impl/ui/gl/gl_shared_context_efl.cc +++ b/tizen_src/chromium_impl/ui/gl/gl_shared_context_efl.cc @@ -12,12 +12,26 @@ #include "base/threading/thread_restrictions.h" #include "gpu/command_buffer/service/mailbox_manager_impl.h" #include "ui/gl/gl_context.h" +#include "ui/gl/gl_implementation.h" #include "ui/gl/gl_share_group.h" #include "ui/gl/gpu_timing.h" -// Defined in gl_current_context_efl.cc because of conflict in chromium -// and efl gl includes. -extern void* GLGetCurentContext(); +void* GLGetCurentContext() { + // Temprorarily load corresponding gl library and shutdown for + // later correct initialization. + // Chromium gl system is not initialized yet and evas gl doesn't + // expose "GetCurrentContext" or "GetNativeContextHandle" API. + base::NativeLibrary library = gl::LoadLibraryAndPrintError("libEGL.so.1"); + typedef EGLContext (*eglGetCurrentContextProc)(void); + + eglGetCurrentContextProc proc = reinterpret_cast( + base::GetFunctionPointerFromNativeLibrary(library, + "eglGetCurrentContext")); + + void* handle = proc(); + base::UnloadNativeLibrary(library); + return handle; +} struct GLSharedContextEflPrivate : public gl::GLContext { GLSharedContextEflPrivate(Evas_Object* object) diff --git a/tizen_src/chromium_impl/ui/ui_efl.gni b/tizen_src/chromium_impl/ui/ui_efl.gni index 87e32c6..bb54b8b 100644 --- a/tizen_src/chromium_impl/ui/ui_efl.gni +++ b/tizen_src/chromium_impl/ui/ui_efl.gni @@ -76,7 +76,6 @@ external_exclude_ui_gl_sources = [] # For //ui/gl target external_ui_gl_sources = [ - "//tizen_src/chromium_impl/ui/gl/gl_current_context_efl.cc", "//tizen_src/chromium_impl/ui/gl/gl_shared_context_efl.cc", "//tizen_src/chromium_impl/ui/gl/gl_shared_context_efl.h", ] -- 2.7.4