Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[xulrunner] Fix embeded offscreen surfaces not being painted. Contrib…
…utes to JB#48494 Instead of trying to intercept composite task to redraw to an embedded surface which stopped working when a scheduling was moved to a distinct object override the actual composite call. Then only swap the front and back buffers if a composite task succeeds and do this before notifying the front end that compositing was done. And finally add a version of GetPlatformImage which takes a callback to invoke to pass the image so a lock can be held preventing buffers being swapped while an image pointer belonging to one of those buffers is being referenced.
- Loading branch information
Showing
9 changed files
with
158 additions
and
73 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
74 changes: 74 additions & 0 deletions
74
rpm/0019-Allow-compositor-specializations-to-override-the-com.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,74 @@ | ||
From f2e8fe315400e9df42d1e89a7d7bacf4fe6038c1 Mon Sep 17 00:00:00 2001 | ||
From: Andrew den Exter <andrew.den.exter@qinetic.com.au> | ||
Date: Mon, 9 Dec 2019 01:29:16 +0000 | ||
Subject: [PATCH] Allow compositor specializations to override the composite | ||
command. | ||
|
||
--- | ||
gfx/layers/ipc/CompositorParent.cpp | 16 +++++++++++++--- | ||
gfx/layers/ipc/CompositorParent.h | 1 + | ||
2 files changed, 14 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/gfx/layers/ipc/CompositorParent.cpp b/gfx/layers/ipc/CompositorParent.cpp | ||
index be0f067..c3cc99b 100644 | ||
--- a/gfx/layers/ipc/CompositorParent.cpp | ||
+++ b/gfx/layers/ipc/CompositorParent.cpp | ||
@@ -437,7 +437,7 @@ CompositorVsyncScheduler::Composite(TimeStamp aVsyncTimestamp) | ||
if (mNeedsComposite || mAsapScheduling) { | ||
mNeedsComposite = 0; | ||
mLastCompose = aVsyncTimestamp; | ||
- ComposeToTarget(nullptr); | ||
+ mCompositorParent->CompositeToDefaultTarget(); | ||
mVsyncNotificationsSkipped = 0; | ||
|
||
TimeDuration compositeFrameTotal = TimeStamp::Now() - aVsyncTimestamp; | ||
@@ -548,7 +548,7 @@ CompositorVsyncScheduler::ResumeComposition() | ||
{ | ||
MOZ_ASSERT(CompositorParent::IsInCompositorThread()); | ||
mLastCompose = TimeStamp::Now(); | ||
- ComposeToTarget(nullptr); | ||
+ mCompositorParent->CompositeToDefaultTarget(); | ||
} | ||
|
||
void | ||
@@ -556,7 +556,11 @@ CompositorVsyncScheduler::ComposeToTarget(gfx::DrawTarget* aTarget, const IntRec | ||
{ | ||
MOZ_ASSERT(CompositorParent::IsInCompositorThread()); | ||
MOZ_ASSERT(mCompositorParent); | ||
- mCompositorParent->CompositeToTarget(aTarget, aRect); | ||
+ if (aTarget) { | ||
+ mCompositorParent->CompositeToTarget(aTarget, aRect); | ||
+ } else { | ||
+ mCompositorParent->CompositeToDefaultTarget(); | ||
+ } | ||
} | ||
|
||
CompositorParent::CompositorParent(nsIWidget* aWidget, | ||
@@ -1044,6 +1048,12 @@ CompositorParent::SetShadowProperties(Layer* aLayer) | ||
} | ||
|
||
void | ||
+CompositorParent::CompositeToDefaultTarget() | ||
+{ | ||
+ CompositeToTarget(nullptr); | ||
+} | ||
+ | ||
+void | ||
CompositorParent::CompositeToTarget(DrawTarget* aTarget, const gfx::IntRect* aRect) | ||
{ | ||
profiler_tracing("Paint", "Composite", TRACING_INTERVAL_START); | ||
diff --git a/gfx/layers/ipc/CompositorParent.h b/gfx/layers/ipc/CompositorParent.h | ||
index bc9a319..7ca9053 100644 | ||
--- a/gfx/layers/ipc/CompositorParent.h | ||
+++ b/gfx/layers/ipc/CompositorParent.h | ||
@@ -422,6 +422,7 @@ protected: | ||
virtual void ScheduleTask(CancelableTask*, int); | ||
void CompositeToTarget(gfx::DrawTarget* aTarget, const gfx::IntRect* aRect = nullptr); | ||
void ForceComposeToTarget(gfx::DrawTarget* aTarget, const gfx::IntRect* aRect = nullptr); | ||
+ virtual void CompositeToDefaultTarget(); | ||
|
||
void SetEGLSurfaceSize(int width, int height); | ||
|
||
-- | ||
1.8.3-rc3 | ||
|
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