WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
91502
Avoid repainting in RenderLayer::scrollTo where possible.
https://bugs.webkit.org/show_bug.cgi?id=91502
Summary
Avoid repainting in RenderLayer::scrollTo where possible.
vollick
Reported
2012-07-17 07:40:02 PDT
Currently, we schedule a full repaint in scrollTo. This is unnecessary if every layer that moves is composited, and every child object is a layer.
Attachments
Patch
(5.50 KB, patch)
2012-07-17 08:00 PDT
,
vollick
no flags
Details
Formatted Diff
Diff
Patch
(5.49 KB, patch)
2012-07-17 11:50 PDT
,
vollick
eric
: review-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
vollick
Comment 1
2012-07-17 08:00:51 PDT
Created
attachment 152764
[details]
Patch
Simon Fraser (smfr)
Comment 2
2012-07-17 11:06:59 PDT
Comment on
attachment 152764
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=152764&action=review
> Source/WebCore/rendering/RenderLayer.cpp:1669 > + const bool movedNonCompositedLayer = updateLayerPositionsAfterScroll();
const bool makes no sense as a return value.
> Source/WebCore/rendering/RenderLayer.cpp:1701 > + for (RenderObject* child = renderer()->firstChild(); child; child = child->nextSibling()) > + hasNonLayerChildObject |= !child->hasLayer();
I don't understand why you're checking for non-layer children.
> Source/WebCore/rendering/RenderLayer.cpp:1705 > + const bool needsFullRepaint = movedNonCompositedLayer || hasNonLayerChildObject;
We don't tent to use const for local variables.
vollick
Comment 3
2012-07-17 11:50:18 PDT
Created
attachment 152799
[details]
Patch (In reply to
comment #2
)
> (From update of
attachment 152764
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=152764&action=review
> > > Source/WebCore/rendering/RenderLayer.cpp:1669 > > + const bool movedNonCompositedLayer = updateLayerPositionsAfterScroll(); > > const bool makes no sense as a return value.
It's just a bool now.
> > > Source/WebCore/rendering/RenderLayer.cpp:1701 > > + for (RenderObject* child = renderer()->firstChild(); child; child = child->nextSibling()) > > + hasNonLayerChildObject |= !child->hasLayer(); > > I don't understand why you're checking for non-layer children.
I hope to skip repainting if the only things that move are composited layers. The return value from updateLayerPositionsAfterScroll() just tells us if any of the layers we moved weren't composited. We also need to know if we could have moved something that isn't a layer at all. If a non-layer changes position due to the scroll, compositing won't save us; we really do need to repaint it in the new location (and repaint the old location). We could potentially be clever and only paint the affected regions, but I decided to stick with the old logic and repaint everything if any repainting might be required.
> > > Source/WebCore/rendering/RenderLayer.cpp:1705 > > + const bool needsFullRepaint = movedNonCompositedLayer || hasNonLayerChildObject; > > We don't tent to use const for local variables.
Removed the const.
James Robinson
Comment 4
2012-07-30 20:43:26 PDT
Comment on
attachment 152799
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=152799&action=review
> Source/WebCore/ChangeLog:12 > + No new tests. Correctness should be covered by existing scroll tests.
To make a change like this we need to have really excellent test coverage. If existing tests really do cover this, can you list the tests that do cover it here? For instance, if you leave out or disable some of the checks you are adding which tests fail? Which tests do we have to make sure we don't introduce unnecessary new repaints?
Eric Seidel (no email)
Comment 5
2012-08-12 03:24:47 PDT
Comment on
attachment 152799
[details]
Patch Our repaint code is incredibly fragil and poorly tested. Please add a test.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug