Closed Bug 478079 Opened 12 years ago Closed 12 years ago

make canvas-color tracking and last-resort repaint entirely the responsibility of the pres shell

Categories

(Core :: Web Painting, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: zwol, Assigned: zwol)

References

Details

Attachments

(1 file, 2 obsolete files)

Attached patch proposed change (obsolete) — Splinter Review
We currently maintain a cache of the canvas frame's background color in the view manager.  This is used to draw the background under circumstances where we can't do a full repaint, and is propagated across pages by the docshell in order to reduce window flashing in between pages with colored backgrounds.

Almost all of the drawing work that's relevant here is being done by the presentation shell (the only exception is when refresh has been disabled in the view manager).  It removes some awkward corner cases (having mostly to do with partial transparency) if we move the cached background color there, and have the view manager always call the presentation shell to do repaint, even when refresh is disabled.  The attached patch does just this.

Unfortunately, this involves interface bumps on all three of nsIViewObserver, nsIViewManager, and nsIPresShell, so I can't recommend it for 1.9.1...
Attachment #361826 - Flags: superreview?(bzbarsky)
Attachment #361826 - Flags: review?(bzbarsky)
forgot to mark dependency of this patch on the patch in bug 476557.
Depends on: 476557
Any particular reason you asked Boris for review? This is more my thing.
Comment on attachment 361826 [details] [diff] [review]
proposed change

> Any particular reason you asked Boris for review? This is more my thing.

No, I was just mixed up.
Attachment #361826 - Flags: superreview?(roc)
Attachment #361826 - Flags: superreview?(bzbarsky)
Attachment #361826 - Flags: review?(roc)
Attachment #361826 - Flags: review?(bzbarsky)
Attachment #361826 - Flags: superreview?(roc)
Attachment #361826 - Flags: superreview+
Attachment #361826 - Flags: review?(roc)
Attachment #361826 - Flags: review+
Comment on attachment 361826 [details] [diff] [review]
proposed change

Thanks for doing this, it's good cleanup.

+  NS_IMETHOD PaintDefaultBg(nsIView *aView,
+                            nsIRenderingContext* aRenderingContext,
+                            const nsRect& aDirtyRect);

Might as well call it PaintDefaultBackground.
This patch needs to be revised for the new patch in bug (In reply to comment #4)
> Might as well call it PaintDefaultBackground.

Ok.

The patch also needs to be revised for the new patch in bug 476557 and some other tree changes.  In particular, bug 442774 bumped the IID on nsIPresShell.  Do I need to bump it again?
Attached patch updated patch, ready for landing (obsolete) — Splinter Review
rediffed for changes in bug 476557 + other changes that landed in nsIPresShell.h.

must land after bug 476557; not for 1.9.1.
Attachment #361826 - Attachment is obsolete: true
Attachment #362357 - Flags: superreview+
Attachment #362357 - Flags: review+
Keywords: checkin-needed
Whiteboard: [needs landing]
Comment on attachment 362357 [details] [diff] [review]
updated patch, ready for landing

patching file layout/base/nsPresShell.cpp
Hunk #2 FAILED at 5379
1 out of 2 hunks FAILED
Attachment #362357 - Attachment is obsolete: true
Depends on: 478784
here's an updated patch.
Attachment #363146 - Flags: superreview+
Attachment #363146 - Flags: review+
Comment on attachment 363146 [details] [diff] [review]
rediffed after bug 478784
[Checkin: Comment 10]


http://hg.mozilla.org/mozilla-central/rev/c67bc280f52f
Attachment #363146 - Attachment description: rediffed after bug 478784 → rediffed after bug 478784 [Checkin: Comment 10]
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [needs landing]
Target Milestone: --- → mozilla1.9.2a1
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.