зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1749100. Use the widget directly in DisplayportSetListener::OnPostRefresh/SendLayersDependentApzcTargetConfirmation. r=emilio
The widget is the thing we care about here. The document/presshell/prescontext are fetched from the widget if we need them for something else. So we don't need to go widget -> prescontext -> presshell -> viewmanager -> rootview -> widget to get the window rendering, just fetch the window renderer right from the widget that we are already storing. (This was pointed out in https://phabricator.services.mozilla.com/D135340 of bug 1749004 as a potential minor behaviour change of that patch.) Differential Revision: https://phabricator.services.mozilla.com/D135440
This commit is contained in:
Родитель
cc5315b51f
Коммит
2a255fbc6d
|
@ -674,14 +674,9 @@ static bool PrepareForSetTargetAPZCNotification(
|
|||
}
|
||||
|
||||
static void SendLayersDependentApzcTargetConfirmation(
|
||||
nsPresContext* aPresContext, uint64_t aInputBlockId,
|
||||
nsIWidget* aWidget, uint64_t aInputBlockId,
|
||||
nsTArray<ScrollableLayerGuid>&& aTargets) {
|
||||
PresShell* ps = aPresContext->GetPresShell();
|
||||
if (!ps) {
|
||||
return;
|
||||
}
|
||||
|
||||
WindowRenderer* renderer = ps->GetWindowRenderer();
|
||||
WindowRenderer* renderer = aWidget->GetWindowRenderer();
|
||||
if (!renderer) {
|
||||
return;
|
||||
}
|
||||
|
@ -720,7 +715,7 @@ void DisplayportSetListener::Register() {
|
|||
void DisplayportSetListener::OnPostRefresh() {
|
||||
APZCCH_LOG("Got refresh, sending target APZCs for input block %" PRIu64 "\n",
|
||||
mInputBlockId);
|
||||
SendLayersDependentApzcTargetConfirmation(mPresContext, mInputBlockId,
|
||||
SendLayersDependentApzcTargetConfirmation(mWidget, mInputBlockId,
|
||||
std::move(mTargets));
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче