Remove gl_current_context_efl.cc 25/286625/2
authorChandan Padhi <c.padhi@samsung.com>
Fri, 6 Jan 2023 13:14:54 +0000 (18:44 +0530)
committerBot Blink <blinkbot@samsung.com>
Wed, 11 Jan 2023 09:32:31 +0000 (09:32 +0000)
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 <c.padhi@samsung.com>
tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.cc
tizen_src/chromium_impl/ui/gl/gl_current_context_efl.cc [deleted file]
tizen_src/chromium_impl/ui/gl/gl_shared_context_efl.cc
tizen_src/chromium_impl/ui/ui_efl.gni

index 8b5be5b..2ef4049 100644 (file)
 
 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 (file)
index 2e8fbee..0000000
+++ /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<eglGetCurrentContextProc>(
-      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();
-}
-}
index 84831f9..a3ca456 100644 (file)
 #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<eglGetCurrentContextProc>(
+      base::GetFunctionPointerFromNativeLibrary(library,
+                                                "eglGetCurrentContext"));
+
+  void* handle = proc();
+  base::UnloadNativeLibrary(library);
+  return handle;
+}
 
 struct GLSharedContextEflPrivate : public gl::GLContext {
   GLSharedContextEflPrivate(Evas_Object* object)
index 87e32c6..bb54b8b 100644 (file)
@@ -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",
 ]