Summary: | Make repainting compositing-aware for accelerated compositing | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||||||||||||||||
Component: | Layout and Rendering | Assignee: | Simon Fraser (smfr) <simon.fraser> | ||||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||||
Severity: | Normal | CC: | cmarrin, dino, hyatt | ||||||||||||||||||
Priority: | P1 | ||||||||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||||||||
Hardware: | Mac | ||||||||||||||||||||
OS: | OS X 10.5 | ||||||||||||||||||||
Bug Depends on: | |||||||||||||||||||||
Bug Blocks: | 23359 | ||||||||||||||||||||
Attachments: |
|
Description
Simon Fraser (smfr)
2009-01-15 15:00:05 PST
Created attachment 27067 [details]
Patch to create container-relative repaint methods
This is phase 1: add variants of the various "absolute repaint" methods that take a RenderBox container, and compute the repaint rect relative to that. For now, RenderObject::containerForRepaint() always returns 0, so all repaints are still root-relative.
Comment on attachment 27067 [details]
Patch to create container-relative repaint methods
r=me
We've got to rename these methods to something better though.
Comment on attachment 27067 [details] Patch to create container-relative repaint methods Committed in http://trac.webkit.org/changeset/40288 Created attachment 27069 [details]
Phase 2 patch: use the new container-relative repaint rects.
Created attachment 27077 [details]
Phase 2 patch: use the new container-relative repaint rects.
Comment on attachment 27077 [details]
Phase 2 patch: use the new container-relative repaint rects.
Will re-do this patch after another change.
Created attachment 27086 [details]
Patch to put the repaintContainer argument first in computeRectForRepaint()
Comment on attachment 27086 [details]
Patch to put the repaintContainer argument first in computeRectForRepaint()
r=me
Comment on attachment 27086 [details] Patch to put the repaintContainer argument first in computeRectForRepaint() Committed: Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/rendering/RenderBox.cpp M WebCore/rendering/RenderBox.h M WebCore/rendering/RenderForeignObject.cpp M WebCore/rendering/RenderForeignObject.h M WebCore/rendering/RenderInline.cpp M WebCore/rendering/RenderObject.cpp M WebCore/rendering/RenderObject.h M WebCore/rendering/RenderReplaced.cpp M WebCore/rendering/RenderTableCell.cpp M WebCore/rendering/RenderTableCell.h M WebCore/rendering/RenderView.cpp M WebCore/rendering/RenderView.h Committed r40300 Created attachment 27087 [details]
Phase 3 patch: use container-relative repaint during layout.
Comment on attachment 27087 [details]
Phase 3 patch: use container-relative repaint during layout.
r=me. Please rename repaintViaContainer to repaintUsingContainer. I think "Via" is just awkward in a method name.
Comment on attachment 27087 [details] Phase 3 patch: use container-relative repaint during layout. Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/rendering/RenderBlock.cpp M WebCore/rendering/RenderFlexibleBox.cpp M WebCore/rendering/RenderForeignObject.cpp M WebCore/rendering/RenderLayer.cpp M WebCore/rendering/RenderLayer.h M WebCore/rendering/RenderObject.cpp M WebCore/rendering/RenderObject.h M WebCore/rendering/RenderPath.cpp M WebCore/rendering/RenderReplaced.cpp M WebCore/rendering/RenderSVGContainer.cpp M WebCore/rendering/RenderSVGImage.cpp M WebCore/rendering/RenderSVGRoot.cpp M WebCore/rendering/RenderSVGText.cpp M WebCore/rendering/RenderSVGViewportContainer.cpp M WebCore/rendering/RenderTable.cpp M WebCore/rendering/bidi.cpp Committed r40303 Created attachment 27193 [details]
Patch to use container-relative methods for computing repaints before layout
Comment on attachment 27193 [details]
Patch to use container-relative methods for computing repaints before layout
r=me
Comment on attachment 27193 [details] Patch to use container-relative methods for computing repaints before layout Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/rendering/RenderObject.h Created attachment 27268 [details]
Final repaint patch: hook up to composited layers.
Comment on attachment 27268 [details]
Final repaint patch: hook up to composited layers.
Put a FIXME in RenderInline, since you aren't really dealing with the problem yet.
You really shouldn't get a null containingBlock() ever from within containingBlockWith()/Height(). I do approve of nuking a useless FIXME though. :)
I think it's ok to have an enclosingCompositingLayer on RenderObject itself. That will make the code cleaner in RenderObject::containerForRepaint.
OwnPtr please for RenderView::m_compositor.
updateRootLayerPosition should not be in updateWidgetPositions. I would suggest updateLayerPositions or updateLayerPosition for the root layer, or perhaps you meant to do it post-layout (either where updateLayerPositions is or in performPostLayoutTasks).
I think you could just fix selection by adding enough info to get back to the repaint container to SelectionInfo objects, and then you wouldn't need the special view method.
Caret painting could also cache the repaint container that it needs to use.
Created attachment 27333 [details]
Updated patch, changelog
Comment on attachment 27333 [details]
Updated patch, changelog
r=me
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/editing/SelectionController.cpp M WebCore/rendering/RenderInline.cpp M WebCore/rendering/RenderLayer.cpp M WebCore/rendering/RenderLayer.h M WebCore/rendering/RenderLayerBacking.cpp M WebCore/rendering/RenderLayerCompositor.cpp M WebCore/rendering/RenderLayerCompositor.h M WebCore/rendering/RenderObject.cpp M WebCore/rendering/RenderObject.h M WebCore/rendering/RenderView.cpp M WebCore/rendering/RenderView.h M WebCore/rendering/RenderWidget.cpp Committed r40640 Repaint work is now complete. |