зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1491798- Schedule repaint if WebRender is updated by tab move r=mattwoodrow
This commit is contained in:
Родитель
1a9c520c89
Коммит
f28d78646a
|
@ -3210,6 +3210,25 @@ TabChild::InvalidateLayers()
|
||||||
FrameLayerBuilder::InvalidateAllLayers(lm);
|
FrameLayerBuilder::InvalidateAllLayers(lm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
TabChild::SchedulePaint()
|
||||||
|
{
|
||||||
|
nsCOMPtr<nsIDocShell> docShell = do_GetInterface(WebNavigation());
|
||||||
|
if (!docShell) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// We don't use TabChildBase::GetPresShell() here because that would create
|
||||||
|
// a content viewer if one doesn't exist yet. Creating a content viewer can
|
||||||
|
// cause JS to run, which we want to avoid. nsIDocShell::GetPresShell
|
||||||
|
// returns null if no content viewer exists yet.
|
||||||
|
if (nsCOMPtr<nsIPresShell> presShell = docShell->GetPresShell()) {
|
||||||
|
if (nsIFrame* root = presShell->GetRootFrame()) {
|
||||||
|
root->SchedulePaint();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TabChild::ReinitRendering()
|
TabChild::ReinitRendering()
|
||||||
{
|
{
|
||||||
|
|
|
@ -540,6 +540,7 @@ public:
|
||||||
|
|
||||||
void ClearCachedResources();
|
void ClearCachedResources();
|
||||||
void InvalidateLayers();
|
void InvalidateLayers();
|
||||||
|
void SchedulePaint();
|
||||||
void ReinitRendering();
|
void ReinitRendering();
|
||||||
void ReinitRenderingForDeviceReset();
|
void ReinitRenderingForDeviceReset();
|
||||||
|
|
||||||
|
|
|
@ -561,6 +561,12 @@ WebRenderLayerManager::WrUpdated()
|
||||||
{
|
{
|
||||||
mWebRenderCommandBuilder.ClearCachedResources();
|
mWebRenderCommandBuilder.ClearCachedResources();
|
||||||
DiscardLocalImages();
|
DiscardLocalImages();
|
||||||
|
|
||||||
|
if (mWidget) {
|
||||||
|
if (dom::TabChild* tabChild = mWidget->GetOwningTabChild()) {
|
||||||
|
tabChild->SchedulePaint();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dom::TabGroup*
|
dom::TabGroup*
|
||||||
|
|
Загрузка…
Ссылка в новой задаче