Bug 23360

Summary: Make repainting compositing-aware for accelerated compositing
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: Layout and RenderingAssignee: 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 Flags
Patch to create container-relative repaint methods
hyatt: review+
Phase 2 patch: use the new container-relative repaint rects.
none
Phase 2 patch: use the new container-relative repaint rects.
none
Patch to put the repaintContainer argument first in computeRectForRepaint()
hyatt: review+
Phase 3 patch: use container-relative repaint during layout.
hyatt: review+
Patch to use container-relative methods for computing repaints before layout
hyatt: review+
Final repaint patch: hook up to composited layers.
hyatt: review-
Updated patch, changelog hyatt: review+

Simon Fraser (smfr)
Reported 2009-01-15 15:00:05 PST
This bug trackes changes to the repainting code that are required for accelerated compositing.
Attachments
Patch to create container-relative repaint methods (45.18 KB, patch)
2009-01-26 21:51 PST, Simon Fraser (smfr)
hyatt: review+
Phase 2 patch: use the new container-relative repaint rects. (27.43 KB, patch)
2009-01-26 23:53 PST, Simon Fraser (smfr)
no flags
Phase 2 patch: use the new container-relative repaint rects. (27.46 KB, patch)
2009-01-27 11:00 PST, Simon Fraser (smfr)
no flags
Patch to put the repaintContainer argument first in computeRectForRepaint() (11.16 KB, patch)
2009-01-27 13:46 PST, Simon Fraser (smfr)
hyatt: review+
Phase 3 patch: use container-relative repaint during layout. (27.79 KB, patch)
2009-01-27 14:19 PST, Simon Fraser (smfr)
hyatt: review+
Patch to use container-relative methods for computing repaints before layout (1.37 KB, patch)
2009-01-30 13:44 PST, Simon Fraser (smfr)
hyatt: review+
Final repaint patch: hook up to composited layers. (14.92 KB, patch)
2009-02-02 17:05 PST, Simon Fraser (smfr)
hyatt: review-
Updated patch, changelog (25.89 KB, patch)
2009-02-04 15:45 PST, Simon Fraser (smfr)
hyatt: review+
Simon Fraser (smfr)
Comment 1 2009-01-26 21:51:20 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.
Dave Hyatt
Comment 2 2009-01-26 22:41:13 PST
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.
Simon Fraser (smfr)
Comment 3 2009-01-26 22:51:31 PST
Filed bug 23565 on renaming.
Simon Fraser (smfr)
Comment 4 2009-01-26 22:58:47 PST
Comment on attachment 27067 [details] Patch to create container-relative repaint methods Committed in http://trac.webkit.org/changeset/40288
Simon Fraser (smfr)
Comment 5 2009-01-26 23:53:42 PST
Created attachment 27069 [details] Phase 2 patch: use the new container-relative repaint rects.
Simon Fraser (smfr)
Comment 6 2009-01-27 11:00:17 PST
Created attachment 27077 [details] Phase 2 patch: use the new container-relative repaint rects.
Simon Fraser (smfr)
Comment 7 2009-01-27 13:46:04 PST
Comment on attachment 27077 [details] Phase 2 patch: use the new container-relative repaint rects. Will re-do this patch after another change.
Simon Fraser (smfr)
Comment 8 2009-01-27 13:46:56 PST
Created attachment 27086 [details] Patch to put the repaintContainer argument first in computeRectForRepaint()
Dave Hyatt
Comment 9 2009-01-27 13:48:53 PST
Comment on attachment 27086 [details] Patch to put the repaintContainer argument first in computeRectForRepaint() r=me
Simon Fraser (smfr)
Comment 10 2009-01-27 13:54:57 PST
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
Simon Fraser (smfr)
Comment 11 2009-01-27 14:19:51 PST
Created attachment 27087 [details] Phase 3 patch: use container-relative repaint during layout.
Dave Hyatt
Comment 12 2009-01-27 14:28:02 PST
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.
Simon Fraser (smfr)
Comment 13 2009-01-27 15:06:19 PST
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
Simon Fraser (smfr)
Comment 14 2009-01-30 13:44:22 PST
Created attachment 27193 [details] Patch to use container-relative methods for computing repaints before layout
Dave Hyatt
Comment 15 2009-01-30 13:45:42 PST
Comment on attachment 27193 [details] Patch to use container-relative methods for computing repaints before layout r=me
Simon Fraser (smfr)
Comment 16 2009-01-30 13:48:45 PST
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
Simon Fraser (smfr)
Comment 17 2009-02-02 17:05:21 PST
Created attachment 27268 [details] Final repaint patch: hook up to composited layers.
Dave Hyatt
Comment 18 2009-02-03 11:33:57 PST
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.
Simon Fraser (smfr)
Comment 19 2009-02-04 15:45:26 PST
Created attachment 27333 [details] Updated patch, changelog
Dave Hyatt
Comment 20 2009-02-04 15:48:06 PST
Comment on attachment 27333 [details] Updated patch, changelog r=me
Simon Fraser (smfr)
Comment 21 2009-02-04 15:57:21 PST
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.
Note You need to log in before you can comment on or make changes to this bug.