Bug 1472140 - 1. Set first paint flag when resuming and resizing composition; r=rbarker

When resuming composition in a new GeckoView, we wait for the first
paint signal in order to uncover the SurfaceView. This patch makes sure
that we always send the first paint signal.

MozReview-Commit-ID: EZeOR80d8HY

--HG--
extra : rebase_source : f82ab94ef87e5b0651f368918e8cd8a97469c68e
This commit is contained in:
Jim Chen 2018-07-30 16:38:35 -04:00
Родитель c80fe8b8d1
Коммит 9c55d02aa5
3 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -74,6 +74,8 @@ UiCompositorControllerParent::RecvResumeAndResize(const int32_t& aWidth,
{ {
CompositorBridgeParent* parent = CompositorBridgeParent::GetCompositorBridgeParentFromLayersId(mRootLayerTreeId); CompositorBridgeParent* parent = CompositorBridgeParent::GetCompositorBridgeParentFromLayersId(mRootLayerTreeId);
if (parent) { if (parent) {
// Front-end expects a first paint callback upon resume/resize.
parent->RecvForceIsFirstPaint();
parent->ResumeCompositionAndResize(aWidth, aHeight); parent->ResumeCompositionAndResize(aWidth, aHeight);
} }
return IPC_OK(); return IPC_OK();

Просмотреть файл

@ -208,6 +208,9 @@ public class GeckoView extends FrameLayout {
return null; return null;
} }
// Cover the view while we are not drawing to the surface.
coverUntilFirstPaint(Color.WHITE);
GeckoSession session = mSession; GeckoSession session = mSession;
mSession.releaseDisplay(mDisplay.release()); mSession.releaseDisplay(mDisplay.release());
mSession.getOverscrollEdgeEffect().setInvalidationCallback(null); mSession.getOverscrollEdgeEffect().setInvalidationCallback(null);

Просмотреть файл

@ -1264,11 +1264,6 @@ nsWindow::GeckoViewSupport::Transfer(const GeckoSession::Window::LocalRef& inst,
[compositor = LayerSession::Compositor::GlobalRef(compositor)] { [compositor = LayerSession::Compositor::GlobalRef(compositor)] {
compositor->OnCompositorAttached(); compositor->OnCompositorAttached();
}); });
// Set the first-paint flag so that we refresh viewports, etc.
if (RefPtr<CompositorBridgeChild> bridge = window.GetCompositorBridgeChild()) {
bridge->SendForceIsFirstPaint();
}
} }
void void