зеркало из https://github.com/mozilla/gecko-dev.git
Bug 797942 - Update compositor size on SIZE_CHANGED or SetCompositor, but only at startup; r=snorp
This commit is contained in:
Родитель
fbbae394e8
Коммит
1b26174e2e
|
@ -771,6 +771,13 @@ nsWindow::OnGlobalAndroidEvent(AndroidGeckoEvent *ae)
|
|||
if (ae->Type() == AndroidGeckoEvent::FORCED_RESIZE || nw != gAndroidBounds.width ||
|
||||
nh != gAndroidBounds.height) {
|
||||
|
||||
if (sCompositorParent != 0 && gAndroidBounds.width == 0) {
|
||||
// Propagate size change to compositor. This is sometimes essential
|
||||
// on startup, because the window size may not have been available
|
||||
// when the compositor was created.
|
||||
ScheduleResumeComposition(nw, nh);
|
||||
}
|
||||
|
||||
gAndroidBounds.width = nw;
|
||||
gAndroidBounds.height = nh;
|
||||
|
||||
|
@ -2242,8 +2249,14 @@ void
|
|||
nsWindow::SetCompositor(mozilla::layers::CompositorParent* aCompositorParent,
|
||||
mozilla::layers::CompositorChild* aCompositorChild)
|
||||
{
|
||||
bool sizeChangeNeeded = (aCompositorParent && !sCompositorParent && gAndroidBounds.width != 0);
|
||||
|
||||
sCompositorParent = aCompositorParent;
|
||||
sCompositorChild = aCompositorChild;
|
||||
|
||||
if (sizeChangeNeeded) {
|
||||
ScheduleResumeComposition(gAndroidBounds.width, gAndroidBounds.height);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче