Crash is observed at browser shutdown as MaiboxManager is getting
deleted twice, once when GpuChannelManager is destroyed and again
in SharedMailboxManager. Since we already maintain a unique pointer
(static) for MailboxManager in SharedMailboxManager, GpuChannelManager
doesn't necessarily need to have another.
This patch also avoids creation of GLShareGroup and MailboxManager
in GpuChannelManager as they are anyway overriden in GpuChildThreadEfl.
Reference :
https://review.tizen.org/gerrit/#/c/179612
Change-Id: I3d4e7e211bb1260ccf28a03da92a94b39f6a16d0
Signed-off-by: Uzair <uzair.jaleel@samsung.com>
gpu_feature_info.enabled_gpu_driver_bug_workarounds),
delegate_(delegate),
watchdog_(watchdog),
+#if !defined(USE_EFL)
share_group_(new gl::GLShareGroup()),
mailbox_manager_(gles2::CreateMailboxManager(gpu_preferences)),
+#endif
gpu_memory_manager_(this),
scheduler_(scheduler),
sync_point_manager_(sync_point_manager),
bool is_exiting_for_lost_context() { return exiting_for_lost_context_; }
+#if defined(USE_EFL)
+ MailboxManager* mailbox_manager() { return mailbox_manager_; }
+#else
MailboxManager* mailbox_manager() { return mailbox_manager_.get(); }
+#endif
gl::GLShareGroup* share_group() const { return share_group_.get(); }
GpuWatchdogThread* watchdog_;
scoped_refptr<gl::GLShareGroup> share_group_;
-
+#if defined(USE_EFL)
+ MailboxManager* mailbox_manager_;
+#else
std::unique_ptr<MailboxManager> mailbox_manager_;
+#endif
std::unique_ptr<gles2::Outputter> outputter_;
GpuMemoryManager gpu_memory_manager_;
Scheduler* scheduler_;
gpu_service->gpu_channel_manager()->share_group_ =
GLSharedContextEfl::GetShareGroup();
gpu_service->gpu_channel_manager()->mailbox_manager_ =
- base::WrapUnique(SharedMailboxManager::GetMailboxManager());
+ SharedMailboxManager::GetMailboxManager();
}
};