[Webkit-unassigned] [Bug 73235] [Chromium] Support adding/removing page overlay to WebView

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 1 21:13:34 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=73235





--- Comment #38 from xiyuan <xiyuan at chromium.org>  2011-12-01 21:13:33 PST ---
(In reply to comment #37)
> (In reply to comment #34)
> > > > Source/WebKit/chromium/public/WebPageOverlay.h:43
> > > > +    // Returns dirty rect that needs repaint.
> > > > +    virtual WebRect dirtyRect() const = 0;
> > > 
> > > I think we should remove dirtyRect() completely from this patch and always consider the full viewport to be covered by every overlay.
> > > 
> > 
> > dirtyRect (or at least a needsRepaint flag) is needed for compositing mode so that we don't always repaint all overlays. This avoids unnecessary paintPageOverlay calls. For background dimming, it's static and does not change so we should only paint it once in composting mode.
> 
> I don't understand - wouldn't a page dimming overlay simply call addPageOverlay() once, get one paint call, and be done with it? The devtools overlay code calls removePageOverlay()/addPageOverlay() every time the highlight changes, which triggers a repaint (fullscreen, currently).
> 
> If we do want to support overlays that are persistent and have partial repaints (although I can't imagine why) a better way to do that is to have the overlay inform the implementation that some rectangle inside the overlay is invalid and then have the implementation request all overlays paint the portion marked invalid.

directRect is useful in composting code path. e.g. WebViewImpl::composite is called when devtools changes highlight and right now, we call PageOverlay::update on all overlays. And if we don't have dirtyRect, dimming overlay will setNeedsDispaly on its layer and paints the dimming again even though nothing changed. With dirtyRect, we could save this unnecessary paint.

On the non-composting code path, dirtyRect is not used and we always repaint all overlays when webview is repainted.

Also see  Vsevolod's comments @ 9.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list