[M76 Dev][EFL] Fix black/white screen at webview launch 29/218629/1
authorChandan Padhi <c.padhi@samsung.com>
Thu, 21 Nov 2019 05:04:03 +0000 (10:34 +0530)
committerChandan Padhi <c.padhi@samsung.com>
Thu, 21 Nov 2019 05:04:03 +0000 (10:34 +0530)
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 <c.padhi@samsung.com>
components/viz/common/features.cc
tizen_src/chromium_impl/content/browser/compositor/evasgl_delegated_frame_host.cc
tizen_src/ewk/efl_integration/ewk_global_data.cc

index 846a519..f8c4506 100644 (file)
@@ -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
index 8a717ed..b260f29 100644 (file)
@@ -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>(
       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,
index 13d98e9..6449f8b 100644 (file)
@@ -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 <dlfcn.h>
 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");