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

RESOLVED FIXED in mozilla1.9.2a1

Status

()

--
enhancement
RESOLVED FIXED
10 years ago
23 days ago

People

(Reporter: zwol, Assigned: zwol)

Tracking

Trunk
mozilla1.9.2a1
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

10 years ago
Created attachment 361826 [details] [diff] [review]
proposed change

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)
(Assignee)

Comment 1

10 years ago
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.
(Assignee)

Comment 3

10 years ago
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.
(Assignee)

Comment 5

10 years ago
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?
(Assignee)

Comment 7

10 years ago
Created attachment 362357 [details] [diff] [review]
updated patch, ready for landing

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+
(Assignee)

Updated

10 years ago
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
(Assignee)

Updated

10 years ago
Depends on: 478784
(Assignee)

Comment 9

10 years ago
Created attachment 363146 [details] [diff] [review]
rediffed after bug 478784
[Checkin: Comment 10]

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
Last Resolved: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [needs landing]
Target Milestone: --- → mozilla1.9.2a1
Component: Layout: View Rendering → Layout: Web Painting
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.