[Webkit-unassigned] [Bug 78872] [chromium] ScrollbarLayerChromium/CCScrollbarLayerImpl for CC-side scrollbar painting

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 17 12:00:54 PST 2012


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





--- Comment #6 from Tien-Ren Chen <trchen at chromium.org>  2012-02-17 12:00:54 PST ---
(In reply to comment #5)
> (From update of attachment 127514 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=127514&action=review
> 
> > Source/WebCore/platform/chromium/ScrollbarThemeCCScrollExample.cpp:74
> > +    float barBegin = scrollbar->currentPos() / scrollbar->totalSize();
> > +    float barEnd = (scrollbar->currentPos() + scrollbar->visibleSize()) / scrollbar->totalSize();
> 
> I don't think this will work without pkotwicz's change in bug 78028.  Scrollbar is an object owned and manipulated on the main thread side.  We don't want to read values from it directly, as it could be being manipulated by the other thread in ways that aren't valid for the current frame on the impl side.

No, we don't try to call anything in ScrollbarTheme from the impl side. It won't work for many reasons. Not only Scrollbar object might be updated unexpectedly, the ScrollbarTheme itself too.

> > Source/WebCore/rendering/RenderLayerCompositor.cpp:1866
> > +            if (ScrollbarThemeCCScroll* theme = scrollbar->theme()->toScrollbarThemeCCScroll())
> > +                theme->attachToGraphicsLayer(scrollbar, m_scrollLayer.get(), m_layerForVerticalScrollbar.get());
> 
> Aren't we going to want to be able to draw any kind of scrollbar theme on the impl side? I'm not sure I follow what this class is trying to do.

The whole idea about ScrollbarThemeCCScroll is to provide an interface to create specialized PlatformLayer for scrollbars. (ScrollbarLayerChromium/CCScrollbarLayerImpl) The impl-side painting logic will be handled by the CCScrollbarLayerImpl implementation.

I don't think it is easy to allow drawing any kind of scrollbar theme on the impl side. It would put too much restriction on the ScrollbarTheme implementation. That means you have to make paint a static function, no access to the ScrollbarTheme during painting.

I think it is necessary to have different painting function for the impl side. Even creating GraphicsContext in the impl side could be a problem (correct me if I'm wrong).

-- 
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