From 01df9be73211ec524e18da880199503f7411a1eb Mon Sep 17 00:00:00 2001 From: v-saha Date: Mon, 23 Jan 2023 19:37:42 +0530 Subject: [PATCH] [M108 Migration][Canvas2D][TCT] Do not accelerate small size canvas. Accelerating canvas with smaller size causes TCT issues since M76, it is known in upstream and reported too. Hence disabling acceleration for smaller canvases for EFL port. References: https://review.tizen.org/gerrit/274897 https://bugs.chromium.org/p/chromium/issues/detail?id=1051392 Change-Id: Ie7642016d3d66b8290c9e3a0d170b5f8e16311fa Signed-off-by: v-saha --- content/child/runtime_features.cc | 4 ++++ third_party/blink/public/platform/web_runtime_features.h | 1 + third_party/blink/renderer/platform/exported/web_runtime_features.cc | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc index 208ace0..3afa697 100644 --- a/content/child/runtime_features.cc +++ b/content/child/runtime_features.cc @@ -122,6 +122,10 @@ void SetRuntimeFeatureDefaultsForPlatform( #if BUILDFLAG(IS_EFL) // No plan to support complex UI for date/time INPUT types. WebRuntimeFeatures::EnableInputMultipleFieldsUI(false); + + // Small accelerated 2d canvas has tct issues, which are known in + // upstream version also. + WebRuntimeFeatures::EnableAcceleratedSmallCanvases(false); #endif } diff --git a/third_party/blink/public/platform/web_runtime_features.h b/third_party/blink/public/platform/web_runtime_features.h index 5897b64b..62b3f1f 100644 --- a/third_party/blink/public/platform/web_runtime_features.h +++ b/third_party/blink/public/platform/web_runtime_features.h @@ -69,6 +69,7 @@ class BLINK_PLATFORM_EXPORT WebRuntimeFeatures : public WebRuntimeFeaturesBase { static void EnableFluentScrollbars(bool); #if BUILDFLAG(IS_EFL) static void EnableInputMultipleFieldsUI(bool); + static void EnableAcceleratedSmallCanvases(bool); #endif WebRuntimeFeatures() = delete; diff --git a/third_party/blink/renderer/platform/exported/web_runtime_features.cc b/third_party/blink/renderer/platform/exported/web_runtime_features.cc index 5dd2b16..263302a 100644 --- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc +++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc @@ -69,6 +69,10 @@ void WebRuntimeFeatures::EnableFluentScrollbars(bool enable) { void WebRuntimeFeatures::EnableInputMultipleFieldsUI(bool enable) { RuntimeEnabledFeatures::SetInputMultipleFieldsUIEnabled(enable); } + +void WebRuntimeFeatures::EnableAcceleratedSmallCanvases(bool enable) { + RuntimeEnabledFeatures::SetAcceleratedSmallCanvasesEnabled(enable); +} #endif } // namespace blink -- 2.7.4