Bug 23360 - Make repainting compositing-aware for accelerated compositing
Summary: Make repainting compositing-aware for accelerated compositing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P1 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords:
Depends on:
Blocks: 23359
  Show dependency treegraph
 
Reported: 2009-01-15 15:00 PST by Simon Fraser (smfr)
Modified: 2009-03-02 11:51 PST (History)
3 users (show)

See Also:


Attachments
Patch to create container-relative repaint methods (45.18 KB, patch)
2009-01-26 21:51 PST, Simon Fraser (smfr)
hyatt: review+
Details | Formatted Diff | Diff
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 Details | Formatted Diff | Diff
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 Details | Formatted Diff | Diff
Patch to put the repaintContainer argument first in computeRectForRepaint() (11.16 KB, patch)
2009-01-27 13:46 PST, Simon Fraser (smfr)
hyatt: review+
Details | Formatted Diff | Diff
Phase 3 patch: use container-relative repaint during layout. (27.79 KB, patch)
2009-01-27 14:19 PST, Simon Fraser (smfr)
hyatt: review+
Details | Formatted Diff | Diff
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+
Details | Formatted Diff | Diff
Final repaint patch: hook up to composited layers. (14.92 KB, patch)
2009-02-02 17:05 PST, Simon Fraser (smfr)
hyatt: review-
Details | Formatted Diff | Diff
Updated patch, changelog (25.89 KB, patch)
2009-02-04 15:45 PST, Simon Fraser (smfr)
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2009-01-15 15:00:05 PST
This bug trackes changes to the repainting code that are required for accelerated compositing.
Comment 1 Simon Fraser (smfr) 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.
Comment 2 Dave Hyatt 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.
Comment 3 Simon Fraser (smfr) 2009-01-26 22:51:31 PST
Filed bug 23565 on renaming.
Comment 4 Simon Fraser (smfr) 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
Comment 5 Simon Fraser (smfr) 2009-01-26 23:53:42 PST
Created attachment 27069 [details]
Phase 2 patch: use the new container-relative repaint rects.
Comment 6 Simon Fraser (smfr) 2009-01-27 11:00:17 PST
Created attachment 27077 [details]
Phase 2 patch: use the new container-relative repaint rects.
Comment 7 Simon Fraser (smfr) 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.
Comment 8 Simon Fraser (smfr) 2009-01-27 13:46:56 PST
Created attachment 27086 [details]
Patch to put the repaintContainer argument first in computeRectForRepaint()
Comment 9 Dave Hyatt 2009-01-27 13:48:53 PST
Comment on attachment 27086 [details]
Patch to put the repaintContainer argument first in computeRectForRepaint()

r=me
Comment 10 Simon Fraser (smfr) 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
Comment 11 Simon Fraser (smfr) 2009-01-27 14:19:51 PST
Created attachment 27087 [details]
Phase 3 patch: use container-relative repaint during layout.
Comment 12 Dave Hyatt 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.
Comment 13 Simon Fraser (smfr) 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
Comment 14 Simon Fraser (smfr) 2009-01-30 13:44:22 PST
Created attachment 27193 [details]
Patch to use container-relative methods for computing repaints before layout
Comment 15 Dave Hyatt 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
Comment 16 Simon Fraser (smfr) 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
Comment 17 Simon Fraser (smfr) 2009-02-02 17:05:21 PST
Created attachment 27268 [details]
Final repaint patch: hook up to composited layers.
Comment 18 Dave Hyatt 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.
Comment 19 Simon Fraser (smfr) 2009-02-04 15:45:26 PST
Created attachment 27333 [details]
Updated patch, changelog
Comment 20 Dave Hyatt 2009-02-04 15:48:06 PST
Comment on attachment 27333 [details]
Updated patch, changelog

r=me
Comment 21 Simon Fraser (smfr) 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.