Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[gecko] Create EmbedLiteCompositorBridgeParent in CompositorBridgeChi…
…ld::InitSameProcess (part 2). JB#49551 Compositor parent is created through following path: - nsWindow::CreateCompositor (is nsBaseWidget) - gfx::GPUProcessManager::CreateTopLevelCompositor - InProcessCompositorSession::Create - CompositorBridgeChild::InitSameProcess
- Loading branch information
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
rpm/0025-gecko-Create-EmbedLiteCompositorBridgeParent-in-Comp.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
From 58bcd34b2eca7b9779d3c1febc4718df44090f86 Mon Sep 17 00:00:00 2001 | ||
From: Raine Makelainen <raine.makelainen@jolla.com> | ||
Date: Fri, 17 Apr 2020 21:01:29 +0300 | ||
Subject: [PATCH 2/2] [gecko] Create EmbedLiteCompositorBridgeParent in | ||
CompositorBridgeChild::InitSameProcess (part 2). JB#49551 | ||
|
||
Compositor parent is created through following path: | ||
- nsWindow::CreateCompositor (is nsBaseWidget) | ||
- gfx::GPUProcessManager::CreateTopLevelCompositor | ||
- InProcessCompositorSession::Create | ||
- CompositorBridgeChild::InitSameProcess | ||
|
||
Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com> | ||
--- | ||
gfx/layers/ipc/CompositorBridgeChild.cpp | 14 ++++++++++++++ | ||
1 file changed, 14 insertions(+) | ||
|
||
diff --git a/gfx/layers/ipc/CompositorBridgeChild.cpp b/gfx/layers/ipc/CompositorBridgeChild.cpp | ||
index f623b10b8706..1d785d0851be 100644 | ||
--- a/gfx/layers/ipc/CompositorBridgeChild.cpp | ||
+++ b/gfx/layers/ipc/CompositorBridgeChild.cpp | ||
@@ -36,6 +36,12 @@ | ||
#include "mozilla/dom/ContentChild.h" | ||
#include "mozilla/Unused.h" | ||
#include "mozilla/DebugOnly.h" | ||
+ | ||
+#if defined(MOZ_EMBEDLITE) | ||
+#include "mozilla/embedlite/nsWindow.h" | ||
+#include "mozilla/embedlite/EmbedLiteCompositorBridgeParent.h" | ||
+#endif | ||
+ | ||
#if defined(XP_WIN) | ||
#include "WinUtils.h" | ||
#endif | ||
@@ -241,8 +247,16 @@ CompositorBridgeChild::InitSameProcess(widget::CompositorWidget* aWidget, | ||
TimeDuration vsyncRate = | ||
gfxPlatform::GetPlatform()->GetHardwareVsync()->GetGlobalDisplay().GetVsyncRate(); | ||
|
||
+#ifdef MOZ_EMBEDLITE | ||
+ auto window = static_cast<mozilla::embedlite::nsWindow *>(aWidget->RealWidget()); | ||
+ mCompositorBridgeParent = | ||
+ new mozilla::embedlite::EmbedLiteCompositorBridgeParent(window->GetUniqueID(), | ||
+ aScale, vsyncRate, | ||
+ aUseExternalSurface, aSurfaceSize); | ||
+#else | ||
mCompositorBridgeParent = | ||
new CompositorBridgeParent(aScale, vsyncRate, aUseExternalSurface, aSurfaceSize); | ||
+#endif | ||
|
||
bool ok = Open(mCompositorBridgeParent->GetIPCChannel(), | ||
CompositorThreadHolder::Loop(), | ||
-- | ||
2.25.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters