зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1769774 - Stop tracking painted PresShells. r=mstange
After bug 1730284 we don't use it for throttling iframes, so the only remaining use the test-only nsIDOMWindowUtils.paintCount. None of the tests using it rely on the empty transaction case, so we should be able to just remove this. Differential Revision: https://phabricator.services.mozilla.com/D146589
This commit is contained in:
Родитель
14feea4bf2
Коммит
7789efcab7
|
@ -6411,15 +6411,11 @@ void PresShell::PaintInternal(nsView* aViewToPaint, PaintInternalFlags aFlags) {
|
|||
(aFlags & PaintInternalFlags::PaintComposite)
|
||||
? WindowRenderer::END_DEFAULT
|
||||
: WindowRenderer::END_NO_COMPOSITE)) {
|
||||
frame->UpdatePaintCountForPaintedPresShells();
|
||||
return;
|
||||
}
|
||||
}
|
||||
frame->RemoveStateBits(NS_FRAME_UPDATE_LAYER_TREE);
|
||||
}
|
||||
if (frame) {
|
||||
frame->ClearPresShellsFromLastPaint();
|
||||
}
|
||||
|
||||
nscolor bgcolor = ComputeBackstopColor(aViewToPaint);
|
||||
PaintFrameFlags flags =
|
||||
|
|
|
@ -11696,18 +11696,6 @@ nsIFrame::PhysicalAxes nsIFrame::ShouldApplyOverflowClipping(
|
|||
return clip ? PhysicalAxes::Both : PhysicalAxes::None;
|
||||
}
|
||||
|
||||
void nsIFrame::AddPaintedPresShell(mozilla::PresShell* aPresShell) {
|
||||
PaintedPresShellList()->AppendElement(do_GetWeakReference(aPresShell));
|
||||
}
|
||||
|
||||
void nsIFrame::UpdatePaintCountForPaintedPresShells() {
|
||||
for (nsWeakPtr& item : *PaintedPresShellList()) {
|
||||
if (RefPtr<mozilla::PresShell> presShell = do_QueryReferent(item)) {
|
||||
presShell->IncrementPaintCount();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
static void GetTagName(nsIFrame* aFrame, nsIContent* aContent, int aResultSize,
|
||||
char* aResult) {
|
||||
|
|
|
@ -4441,24 +4441,6 @@ class nsIFrame : public nsQueryFrame {
|
|||
*/
|
||||
virtual void PullOverflowsFromPrevInFlow() {}
|
||||
|
||||
/**
|
||||
* Clear the list of child PresShells generated during the last paint
|
||||
* so that we can begin generating a new one.
|
||||
*/
|
||||
void ClearPresShellsFromLastPaint() { PaintedPresShellList()->Clear(); }
|
||||
|
||||
/**
|
||||
* Flag a child PresShell as painted so that it will get its paint count
|
||||
* incremented during empty transactions.
|
||||
*/
|
||||
void AddPaintedPresShell(mozilla::PresShell* aPresShell);
|
||||
|
||||
/**
|
||||
* Increment the paint count of all child PresShells that were painted during
|
||||
* the last repaint.
|
||||
*/
|
||||
void UpdatePaintCountForPaintedPresShells();
|
||||
|
||||
/**
|
||||
* Accessors for the absolute containing block.
|
||||
*/
|
||||
|
@ -4475,7 +4457,7 @@ class nsIFrame : public nsQueryFrame {
|
|||
return kAbsoluteList;
|
||||
}
|
||||
|
||||
// Checks if we (or any of our descendents) have NS_FRAME_PAINTED_THEBES set,
|
||||
// Checks if we (or any of our descendants) have NS_FRAME_PAINTED_THEBES set,
|
||||
// and clears this bit if so.
|
||||
bool CheckAndClearPaintedState();
|
||||
|
||||
|
@ -5010,27 +4992,6 @@ class nsIFrame : public nsQueryFrame {
|
|||
|
||||
void MarkAbsoluteFramesForDisplayList(nsDisplayListBuilder* aBuilder);
|
||||
|
||||
// Stores weak references to all the PresShells that were painted during
|
||||
// the last paint event so that we can increment their paint count during
|
||||
// empty transactions
|
||||
NS_DECLARE_FRAME_PROPERTY_DELETABLE(PaintedPresShellsProperty,
|
||||
nsTArray<nsWeakPtr>)
|
||||
|
||||
nsTArray<nsWeakPtr>* PaintedPresShellList() {
|
||||
bool found;
|
||||
nsTArray<nsWeakPtr>* list =
|
||||
GetProperty(PaintedPresShellsProperty(), &found);
|
||||
|
||||
if (!found) {
|
||||
list = new nsTArray<nsWeakPtr>();
|
||||
AddProperty(PaintedPresShellsProperty(), list);
|
||||
} else {
|
||||
MOZ_ASSERT(list, "this property should only store non-null values");
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
protected:
|
||||
void MarkInReflow() {
|
||||
#ifdef DEBUG_dbaron_off
|
||||
|
|
|
@ -1056,7 +1056,6 @@ nsCaret* nsDisplayListBuilder::GetCaret() {
|
|||
|
||||
void nsDisplayListBuilder::IncrementPresShellPaintCount(PresShell* aPresShell) {
|
||||
if (mIsPaintingToWindow) {
|
||||
mReferenceFrame->AddPaintedPresShell(aPresShell);
|
||||
aPresShell->IncrementPaintCount();
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче