[Rendering] Enable use of virtualized gl context 36/324636/7
authorsidpaswan <s.paswan@samsung.com>
Thu, 22 May 2025 05:28:05 +0000 (10:58 +0530)
committerBot Blink <blinkbot@samsung.com>
Thu, 22 May 2025 19:59:19 +0000 (19:59 +0000)
This patch enables the use of virtualized gl context to avoid creation of one extra egl context for rendering.
During context switching eglMakeCurrent fails resulting rendering issues such as blackscreen and flickering.

Reference: https://source.chromium.org/chromium/chromium/src/+/b5c1f24dca6e2e4343726413bab61d4bbbd9ca21

Change-Id: I4b9e05f831db8f8784cb1a3472df1a81f668c054
Signed-off-by: sidpaswan <s.paswan@samsung.com>
gpu/ipc/in_process_gpu_thread_holder.cc
gpu/ipc/service/gles2_command_buffer_stub.cc
gpu/ipc/service/gpu_channel_manager.cc

index 9afa6ba5fbde66f3407b37a6eef1119407feac36..e15e882bedf17b32d80682fe60f4635ef467d322 100644 (file)
@@ -86,7 +86,7 @@ void InProcessGpuThreadHolder::InitializeOnGpuThread(
       gpu_feature_info_.enabled_gpu_driver_bug_workarounds);
 
   bool use_virtualized_gl_context = false;
-#if BUILDFLAG(IS_MAC)
+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_TIZEN)
   // Virtualize GpuPreference:::kLowPower contexts by default on OS X to prevent
   // performance regressions when enabling FCM. https://crbug.com/180463
   use_virtualized_gl_context = true;
index c709aaae1fc768cb9b763c3473af60ae733535db..ef92266fdcf976d4a1c8b3dcfa5b5d2f3f97c384 100644 (file)
@@ -122,6 +122,10 @@ gpu::ContextResult GLES2CommandBufferStub::Initialize(
     use_virtualized_gl_context_ = true;
 #endif
 
+#if BUILDFLAG(IS_TIZEN)
+    use_virtualized_gl_context_ = true;
+#endif
+
   use_virtualized_gl_context_ |=
       context_group_->feature_info()->workarounds().use_virtualized_gl_contexts;
 
index effb7e3e100929e0461274a451fdd773629c83e1..ec3f2d5c9917dd8f72a22d19917bdab3d347d1f0 100644 (file)
@@ -912,7 +912,7 @@ scoped_refptr<SharedContextState> GpuChannelManager::GetSharedContextState(
 
   scoped_refptr<gl::GLSurface> surface = default_offscreen_surface();
   bool use_virtualized_gl_contexts = false;
-#if BUILDFLAG(IS_MAC)
+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_TIZEN)
   // Virtualize GpuPreference::kLowPower contexts by default on OS X to prevent
   // performance regressions when enabling FCM.
   // http://crbug.com/180463