This commit fixes the crashes during webview launch.
It also fixes the white screen observed later.
Basic page rendering works fine on desktop.
Reference: https://review.tizen.org/gerrit/#/c/171308/
Change-Id: I5825876d8294ebfed387ee4b09da3aeb13e58954
Signed-off-by: Chandan Padhi <c.padhi@samsung.com>
class MessagePumpForUI;
#endif
+#if defined(USE_EFL)
+class MessagePumpForUIEfl;
+#endif
+
#if defined(OS_IOS)
class MessagePumpUIApplication;
#endif
friend class base::MessagePumpForUI;
#endif
+#if defined(USE_EFL)
+ // EFL doesn't support the blocking RunLoop::Run, so it calls
+ // BeforeRun directly.
+ friend class base::MessagePumpForUIEfl;
+#endif
+
#if defined(OS_IOS)
// iOS doesn't support the blocking RunLoop::Run, so it calls
// BeforeRun directly.
void BrowserMainLoop::GetCompositingModeReporter(
viz::mojom::CompositingModeReporterRequest request) {
-#if defined(OS_ANDROID)
+#if defined(OS_ANDROID) || defined(USE_EFL)
// Android doesn't support non-gpu compositing modes, and doesn't make a
// CompositingModeReporter.
return;
}
WebThemeEngine* BlinkPlatformImpl::ThemeEngine() {
-#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
return &native_theme_engine_;
-#else
- return nullptr;
-#endif
}
WebFallbackThemeEngine* BlinkPlatformImpl::FallbackThemeEngine() {
scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_;
-#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
WebThemeEngineImpl native_theme_engine_;
-#endif
WebFallbackThemeEngineImpl fallback_theme_engine_;
base::ThreadLocalStorage::Slot current_thread_slot_;
webcrypto::WebCryptoImpl web_crypto_;
# Unhandled Tap enable means Contextual Search aka Touch to Search.
enable_unhandled_tap = is_android
-use_default_render_theme = use_aura
+use_default_render_theme = use_aura || use_efl
# Use Minikin hyphenation engine.
use_minikin_hyphenation = is_android
return NativeTheme();
}
-// TODO: Remove this mock theme and apply the appropriate theme for tizen.
-#if defined(EWK_BRINGUP)
-ScrollbarTheme& ScrollbarTheme::NativeTheme() {
- DEFINE_STATIC_LOCAL(ScrollbarThemeMock, mock_theme, ());
- return mock_theme;
-}
-#endif
-
void ScrollbarTheme::SetMockScrollbarsEnabled(bool flag) {
g_mock_scrollbars_enabled_ = flag;
}
Ecore_X_Window GetEcoreXWindow() const;
#endif
- RenderWidgetHostImpl* host_;
std::unique_ptr<EvasGLDelegatedFrameHost> evasgl_delegated_frame_host_;
IMContextEfl* im_context_;
Evas* evas_;
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/command_line.h"
+#include "base/time/time.h"
#include "content/gpu/gpu_process.h"
#include "content/public/common/content_client.h"
-#include "content/public/gpu/content_gpu_client.h"
+#include "content/public/common/content_switches.h"
#include "gpu/command_buffer/client/shared_mailbox_manager.h"
+#include "gpu/command_buffer/service/gpu_preferences.h"
#include "gpu/command_buffer/service/mailbox_manager.h"
-#include "gpu/config/gpu_info_collector.h"
#include "gpu/ipc/service/gpu_init.h"
#include "ui/gl/gl_shared_context_efl.h"
explicit GpuChildThreadEfl(const InProcessChildThreadParams& params,
std::unique_ptr<gpu::GpuInit> gpu_init)
: GpuChildThread(params, std::move(gpu_init)) {}
+
+ void OnGpuServiceConnection(viz::GpuServiceImpl* gpu_service) override {
+ GpuChildThread::OnGpuServiceConnection(gpu_service);
+ gpu_service->gpu_channel_manager()->share_group_ =
+ GLSharedContextEfl::GetShareGroup();
+ gpu_service->gpu_channel_manager()->mailbox_manager_ =
+ base::WrapUnique(SharedMailboxManager::GetMailboxManager());
+ }
};
struct InProcessGpuThreadEfl : public content::InProcessGpuThread {
void Init() override {
gpu_process_ = new content::GpuProcess(base::ThreadPriority::NORMAL);
- gpu::GPUInfo gpu_info;
- gpu::CollectContextGraphicsInfo(&gpu_info);
-
auto gpu_init = std::make_unique<gpu::GpuInit>();
gpu_init->InitializeInProcess(base::CommandLine::ForCurrentProcess(),
gpu_preferences_);
+ GetContentClient()->SetGpuInfo(gpu_init->gpu_info());
+
// The process object takes ownership of the thread object, so do not
// save and delete the pointer.
- gpu_process_->set_main_thread(
- new GpuChildThreadEfl(params_, std::move(gpu_init)));
+ GpuChildThread* child_thread =
+ new GpuChildThreadEfl(params_, std::move(gpu_init));
+
+ // Since we are in the browser process, use the thread start time as the
+ // process start time.
+ child_thread->Init(base::Time::Now());
+
+ gpu_process_->set_main_thread(child_thread);
}
};
#include "content/utility/in_process_utility_thread.h"
#include "efl/window_factory.h"
#include "eweb_view.h"
+#include "mojo/edk/embedder/embedder.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/ozone/public/ozone_platform.h"
instance_ = new EwkGlobalData();
+ // TODO: Check if service_manager::Main should be used instead.
+ // The Mojo EDK must be initialized before using IPC.
+ mojo::edk::Init();
+
bool message_pump_overridden =
base::MessageLoop::InitMessagePumpForUIFactory(&MessagePumpFactory);
DCHECK(message_pump_overridden);
}
Delegate* delegate = base::MessageLoopForUI::current();
-#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
if (!run_loop_) {
run_loop_ = new RunLoop();
bool result = run_loop_->BeforeRun();
DCHECK(result);
}
-#endif
bool more_work_is_plausible = delegate->DoWork();
net::DISK_CACHE, net::CACHE_BACKEND_DEFAULT, cache_path, 0);
}
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
+ if (command_line.HasSwitch(switches::kHostResolverRules)) {
+ std::unique_ptr<net::MappedHostResolver> mapped_host_resolver(
+ new net::MappedHostResolver(std::move(host_resolver)));
+ mapped_host_resolver->SetRulesFromString(
+ command_line.GetSwitchValueASCII(switches::kHostResolverRules));
+ host_resolver = std::move(mapped_host_resolver);
+ }
+#endif
+ // Give |storage_| ownership at the end in case it's |mapped_host_resolver|.
+ storage_->set_host_resolver(std::move(host_resolver));
+
net::HttpNetworkSession::Context network_session_context;
network_session_context.cert_verifier =
url_request_context_->cert_verifier();
&value);
network_session_params.testing_fixed_https_port = value;
}
-#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
- if (command_line.HasSwitch(switches::kHostResolverRules)) {
- std::unique_ptr<net::MappedHostResolver> mapped_host_resolver(
- new net::MappedHostResolver(std::move(host_resolver)));
- mapped_host_resolver->SetRulesFromString(
- command_line.GetSwitchValueASCII(switches::kHostResolverRules));
- host_resolver = std::move(mapped_host_resolver);
- }
-#endif
- // Give |storage_| ownership at the end in case it's |mapped_host_resolver|.
- storage_->set_host_resolver(std::move(host_resolver));
http_network_session_.reset(new net::HttpNetworkSession(
network_session_params, network_session_context));
// static
bool GLSurfaceEGL::InitializeOneOffCommon() {
g_egl_extensions = eglQueryString(g_egl_display, EGL_EXTENSIONS);
-
+#if !defined(USE_EFL)
g_egl_create_context_robustness_supported =
HasEGLExtension("EGL_EXT_create_context_robustness");
+#endif
g_egl_create_context_bind_generates_resource_supported =
HasEGLExtension("EGL_CHROMIUM_create_context_bind_generates_resource");
g_egl_create_context_webgl_compatability_supported =