Bug 1365660: Part 4 - Only enable APZ for popups which contain remote content. r?kats
We only ever need to enable APZ for popups which contain remote content. In
theory, enabling it for other popups shouldn't hurt, but having it enabled
adds overhead that we'd rather avoid, and causes painting issues under some
circumstances.
Ideally, the painting issues should be fixed, but disabling APZ is a good
short term workaround, and we should try to avoid the unnecessary overhead
either way.
MozReview-Commit-ID: AOivnTQBWQh
--- a/widget/nsBaseWidget.cpp
+++ b/widget/nsBaseWidget.cpp
@@ -889,17 +889,17 @@ nsBaseWidget::ComputeShouldAccelerate()
}
bool
nsBaseWidget::UseAPZ()
{
return (gfxPlatform::AsyncPanZoomEnabled() &&
(WindowType() == eWindowType_toplevel ||
WindowType() == eWindowType_child ||
- (WindowType() == eWindowType_popup && !IsSmallPopup())));
+ (WindowType() == eWindowType_popup && HasRemoteContent())));
}
void nsBaseWidget::CreateCompositor()
{
LayoutDeviceIntRect rect = GetBounds();
CreateCompositor(rect.width, rect.height);
}