[M108 Migration][WebGL] Disable |CommandBufferHelper| auto flushing. 01/285901/7
authorsuyambu.rm <suyambu.rm@samsung.com>
Fri, 15 Oct 2021 09:48:42 +0000 (17:48 +0800)
committerDae-Hyun Ko <dhyuna.ko@samsung.com>
Mon, 2 Jan 2023 05:12:30 +0000 (05:12 +0000)
If |automatic_flushes| is true, buffer of |CommandBufferHelper| is flushed
automatically and it causes sync message calls. Due to this main thread is
blocked and performance degradation is observed.

+--------------------+--------+--------+
|      KPI           | Before | After  |
+--------------------+--------+--------+
| 3D/Aquarium        | 35~60  | ~60    |
+--------------------+--------+--------+
| 3D/100 Objects     | 35~60  | ~60    |
+--------------------+--------+--------+
(Target : TV)

Reference: https://review.tizen.org/gerrit/265363

Change-Id: If287b3b4d12e29c159a70361d251b871377c6818
Signed-off-by: uzair <uzair.jaleel@samsung.com>
content/renderer/renderer_blink_platform_impl.cc

index 4cedfbf..b5797d5 100644 (file)
@@ -750,7 +750,14 @@ RendererBlinkPlatformImpl::CreateOffscreenGraphicsContext3DProvider(
 
   attributes.context_type = ToGpuContextType(web_attributes.context_type);
 
+#if BUILDFLAG(IS_TIZEN)
+  // If |automatic_flushes| is true, buffer of |CommandBufferHelper| is flushed
+  // automatically and it causes sync message calls. Due to this main thread is
+  // blocked and performance degradation is observed.
+  constexpr bool automatic_flushes = false;
+#else
   constexpr bool automatic_flushes = true;
+#endif
   constexpr bool support_locking = false;
   bool use_grcontext =
       !attributes.enable_oop_rasterization && web_attributes.support_grcontext;