[M130 Migration][VD] Give an option to enable GPU rasterization 09/325709/2
authorDanZhao <danys.zhao@samsung.com>
Fri, 13 Jun 2025 07:19:01 +0000 (15:19 +0800)
committerBot Blink <blinkbot@samsung.com>
Fri, 13 Jun 2025 09:09:51 +0000 (09:09 +0000)
for web app

Because of wrt preloading, the GPU raster is initialized
with default disable value.

When wrt launch app with enable command line,
GPU raster has finished update value.

So need to update related parameter manually to enable rasterization

refer:
https://archive.tizen.org/gerrit/#/c/315895/

Change-Id: Ib51da9818e8740a61d306ebbc3fc5c63f0499379
Signed-off-by: DanZhao <danys.zhao@samsung.com>
content/browser/compositor/viz_process_transport_factory.cc
content/renderer/render_thread_impl.cc

index 86b9e883f4e1531215e6000d32657f553f941802..93cefb93f0c752e5cedfc2421f4fc8794ec286ff 100644 (file)
@@ -45,6 +45,7 @@
 #include "content/public/common/content_switches.h"
 #include "content/public/common/gpu_stream_constants.h"
 #include "gpu/command_buffer/client/raster_interface.h"
+#include "gpu/config/gpu_switches.h"
 #include "gpu/ipc/client/gpu_channel_host.h"
 #include "media/base/media_switches.h"
 #include "mojo/public/cpp/bindings/associated_remote.h"
@@ -553,12 +554,19 @@ VizProcessTransportFactory::TryCreateContextsForGpuCompositing(
     worker_context_provider_wrapper_.reset();
   }
 
-  const bool enable_gpu_rasterization =
+  bool enable_gpu_rasterization =
       features::IsUiGpuRasterizationEnabled() &&
       gpu_feature_info
               .status_values[gpu::GPU_FEATURE_TYPE_GPU_TILE_RASTERIZATION] ==
           gpu::kGpuFeatureStatusEnabled;
 
+#if BUILDFLAG(IS_TIZEN_TV)
+  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+          switches::kEnableGpuRasterization)) {
+    enable_gpu_rasterization = true;
+  }
+#endif
+
   if (!worker_context_provider_wrapper_) {
     // If the worker context supports GPU rasterization then UI tiles will be
     // rasterized on the GPU.
index 89c64b26bafa4adf5e184d52e5d129fb894aaacc..e8a5e511307b8a1920d5ab51a791b1e0c81f1f0f 100644 (file)
@@ -1701,6 +1701,13 @@ RenderThreadImpl::SharedCompositorWorkerContextProvider(
           .status_values[gpu::GPU_FEATURE_TYPE_GPU_TILE_RASTERIZATION] ==
       gpu::kGpuFeatureStatusEnabled;
 
+#if BUILDFLAG(IS_TIZEN_TV)
+  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+          switches::kEnableGpuRasterization)) {
+    support_gpu_rasterization = true;
+  }
+#endif
+
   bool support_gles2_interface = false;
   bool support_raster_interface = true;
   bool support_grcontext = false;