From a068b95da7e1cd66f4c7624139d059164ba19c4e Mon Sep 17 00:00:00 2001 From: Chandan Padhi Date: Thu, 21 Nov 2019 10:34:03 +0530 Subject: [PATCH] [M76 Dev][EFL] Fix black/white screen at webview launch This commit does the following to fix black/white screen at webview launch. 1. Initializes FieldTrialList. 2. Disables SurfaceSynchronization. 3. Disables SharedImages. Change-Id: I70d9e59f1db30fa47e3f1dca739fbbc87e0340b6 Signed-off-by: Chandan Padhi --- components/viz/common/features.cc | 5 +++++ .../browser/compositor/evasgl_delegated_frame_host.cc | 4 +--- tizen_src/ewk/efl_integration/ewk_global_data.cc | 12 +++--------- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/components/viz/common/features.cc b/components/viz/common/features.cc index 846a519..f8c4506 100644 --- a/components/viz/common/features.cc +++ b/components/viz/common/features.cc @@ -19,8 +19,13 @@ constexpr char kProvider[] = "provider"; constexpr char kDrawQuad[] = "draw_quad"; constexpr char kSurfaceLayer[] = "surface_layer"; +#if defined(USE_EFL) +const base::Feature kEnableSurfaceSynchronization{ + "SurfaceSynchronization", base::FEATURE_DISABLED_BY_DEFAULT}; +#else const base::Feature kEnableSurfaceSynchronization{ "SurfaceSynchronization", base::FEATURE_ENABLED_BY_DEFAULT}; +#endif // Enables running the display compositor as part of the viz service in the GPU // process. This is also referred to as out-of-process display compositor diff --git a/tizen_src/chromium_impl/content/browser/compositor/evasgl_delegated_frame_host.cc b/tizen_src/chromium_impl/content/browser/compositor/evasgl_delegated_frame_host.cc index 8a717ed..b260f29 100644 --- a/tizen_src/chromium_impl/content/browser/compositor/evasgl_delegated_frame_host.cc +++ b/tizen_src/chromium_impl/content/browser/compositor/evasgl_delegated_frame_host.cc @@ -33,11 +33,9 @@ void EvasGLDelegatedFrameHost::Initialize() { new EvasGLOutputSurface(context_provider_)); output_surface_->BindToClient(output_surface_client_.get()); - // TODO: Check if this has to be true. - // constexpr bool delegated_sync_points_required = false; resource_provider_ = std::make_unique( viz::DisplayResourceProvider::kGpu, output_surface_->context_provider(), - nullptr); + nullptr /* shared_bitmap_manager */, false /* enable_shared_images */); child_id_ = resource_provider_->CreateChild( base::Bind(&EvasGLDelegatedFrameHost::UnrefResources, diff --git a/tizen_src/ewk/efl_integration/ewk_global_data.cc b/tizen_src/ewk/efl_integration/ewk_global_data.cc index 13d98e9..6449f8b 100644 --- a/tizen_src/ewk/efl_integration/ewk_global_data.cc +++ b/tizen_src/ewk/efl_integration/ewk_global_data.cc @@ -4,19 +4,19 @@ #include "ewk_global_data.h" -#include "base/base_switches.h" #include "base/cpu.h" -#include "base/feature_list.h" #include "base/logging.h" #include "base/message_loop/message_loop.h" #include "base/message_loop/message_pump_for_ui_efl.h" #include "base/path_service.h" #include "browser/autofill/personal_data_manager_factory.h" +#include "content/browser/gpu/gpu_main_thread_factory.h" #include "content/browser/gpu/gpu_process_host.h" #include "content/browser/renderer_host/render_process_host_impl.h" #include "content/browser/scheduler/browser_task_executor.h" #include "content/browser/startup_helper.h" #include "content/browser/utility_process_host.h" +#include "content/child/field_trial.h" #include "content/gpu/in_process_gpu_thread.h" #include "content/public/app/content_main.h" #include "content/public/app/content_main_runner.h" @@ -36,8 +36,6 @@ #include "content_main_delegate_efl.h" #include "ui/display/screen_efl.h" -#include "content/browser/gpu/gpu_main_thread_factory.h" - #ifdef OS_TIZEN #include void* EflExtensionHandle = 0; @@ -136,11 +134,7 @@ EwkGlobalData* EwkGlobalData::GetInstance() { ui::OzonePlatform::InitializeForUI(init_params); #endif - const base::CommandLine* command_line = - base::CommandLine::ForCurrentProcess(); - base::FeatureList::InitializeInstance( - command_line->GetSwitchValueASCII(switches::kEnableFeatures), - command_line->GetSwitchValueASCII(switches::kDisableFeatures)); + content::InitializeFieldTrialAndFeatureList(); // Start ThreadPool before creating BrowserMainLoop. base::ThreadPoolInstance::Create("Browser"); -- 2.7.4