зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1580153 - Call NotifyFirstPaint on next composite after RecvResumeAndResize. r=jrmuizel
Previously after RecvResumeAndResize() we would set a flag on the root WebRenderBridgeParent, which in turn sets a flag on the next display list it receives that it should be treated as a first paint. Then when that display list is finally composited, we call UiCompositorControllerParent::NotifyFirstPaint(), which in turn tells GeckoView to uncover the widget. After switching tabs in GeckoView browsers, however, the root WebRenderBridgeParent does not always receive a new display list, so the widget would not be uncovered. Instead of waiting for the next received display list to be composited, we simply want to uncover the widget on the next composite. To achieve this we instead set the forced-first-paint flag on the root CompositorBridgeParent then we call NotifyFirstPaint() during CompositorBridgeParent::NotifyPipelineRendered(). Differential Revision: https://phabricator.services.mozilla.com/D46157 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
c860a49663
Коммит
35886dcefd
|
@ -322,6 +322,7 @@ CompositorBridgeParent::CompositorBridgeParent(
|
|||
mPendingTransaction{0},
|
||||
mPaused(false),
|
||||
mHaveCompositionRecorder(false),
|
||||
mIsForcedFirstPaint(false),
|
||||
mUseExternalSurfaceSize(aUseExternalSurfaceSize),
|
||||
mEGLSurfaceSize(aSurfaceSize),
|
||||
mOptions(aOptions),
|
||||
|
@ -418,7 +419,7 @@ CompositorBridgeParent::~CompositorBridgeParent() {
|
|||
|
||||
void CompositorBridgeParent::ForceIsFirstPaint() {
|
||||
if (mWrBridge) {
|
||||
mWrBridge->ForceIsFirstPaint();
|
||||
mIsForcedFirstPaint = true;
|
||||
} else {
|
||||
mCompositionManager->ForceIsFirstPaint();
|
||||
}
|
||||
|
@ -2138,6 +2139,11 @@ void CompositorBridgeParent::NotifyPipelineRendered(
|
|||
mWrBridge->RemoveEpochDataPriorTo(aEpoch);
|
||||
|
||||
if (!mPaused) {
|
||||
if (mIsForcedFirstPaint) {
|
||||
uiController->NotifyFirstPaint();
|
||||
mIsForcedFirstPaint = false;
|
||||
}
|
||||
|
||||
TransactionId transactionId = mWrBridge->FlushTransactionIdsForEpoch(
|
||||
aEpoch, aCompositeStartId, aCompositeStart, aRenderStart,
|
||||
aCompositeEnd, uiController);
|
||||
|
|
|
@ -760,6 +760,7 @@ class CompositorBridgeParent final : public CompositorBridgeParentBase,
|
|||
|
||||
bool mPaused;
|
||||
bool mHaveCompositionRecorder;
|
||||
bool mIsForcedFirstPaint;
|
||||
|
||||
bool mUseExternalSurfaceSize;
|
||||
gfx::IntSize mEGLSurfaceSize;
|
||||
|
|
|
@ -260,16 +260,6 @@ class WebRenderBridgeParent final
|
|||
|
||||
void RemoveEpochDataPriorTo(const wr::Epoch& aRenderedEpoch);
|
||||
|
||||
/**
|
||||
* This sets the is-first-paint flag to true for the next received
|
||||
* display list. This is intended to be called by the widget code when it
|
||||
* loses its viewport information (or for whatever reason wants to refresh
|
||||
* the viewport information). The message will sent back to the widget code
|
||||
* via UiCompositorControllerParent::NotifyFirstPaint() when the corresponding
|
||||
* transaction is flushed.
|
||||
*/
|
||||
void ForceIsFirstPaint() { mIsFirstPaint = true; }
|
||||
|
||||
void PushDeferredPipelineData(RenderRootDeferredData&& aDeferredData);
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче