Bug 128460

Summary: Subpixel rendering: Make GraphicsLayerClient::paintContents's clip rect subpixel based.
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarcelo, commit-queue, esprehn+autocc, glenn, jonlee, kondapallykalyan, luiz, noam, sergio, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Description zalan 2014-02-08 11:24:07 PST
This is the first step in transitioning to subpixel render layer offsetting from the integral positioned graphics layer.
Comment 1 zalan 2014-02-08 11:44:39 PST
Created attachment 223574 [details]
Patch
Comment 2 zalan 2014-02-08 11:44:58 PST
Comment on attachment 223574 [details]
Patch

EWS testing.
Comment 3 zalan 2014-02-08 13:03:29 PST
Created attachment 223579 [details]
Patch
Comment 4 zalan 2014-02-08 13:03:55 PST
Comment on attachment 223579 [details]
Patch

EWS testing ports
Comment 5 zalan 2014-02-10 19:37:32 PST
Created attachment 223794 [details]
Patch
Comment 6 Simon Fraser (smfr) 2014-02-10 22:05:55 PST
Comment on attachment 223794 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=223794&action=review

r- because of my questions.

> Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:258
> +    m_client->paintLayerContents(graphicsLayer, graphicsContext, IntRect(clipRect));

enclosingIntRect()? If you plan to change this later, it should get a FIXME I think.

> Source/WebCore/rendering/RenderLayer.cpp:2652
> -static LayoutRect cornerRect(const RenderLayer* layer, const LayoutRect& bounds)
> +static IntRect cornerRect(const RenderLayer* layer, const IntRect& bounds)

Not sure why you changed these; the corner/scrollbar rects need to be device pixel aligned at some point, so won't that involve going back to layout units?

> Source/WebCore/rendering/RenderLayerBacking.cpp:2198
> +    IntRect pixelSnappedRectForIntegralPositionedItems(pixelSnappedIntRect(dirtyRect));

We normally initialize with =, so pixelSnappedRectForIntegralPositionedItems = pixelSnappedIntRect(dirtyRect);

> Source/WebCore/rendering/RenderLayerCompositor.cpp:2613
> +    IntRect pixelSnappedRectForIntegralPositionedItems(pixelSnappedIntRect(LayoutRect(clip)));

Ditto.

> Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp:403
> +    core(m_webView)->mainFrame().view()->paint(&context, IntRect(rectToPaint));

enclosing?

> Source/WebKit/win/WebView.cpp:6736
> +    frame->view()->paint(&context, IntRect(inClip));

enclosing?

> Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:278
> +        m_webPage->drawRect(graphicsContext, IntRect(clipRect));

enclosing?

> Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:284
> +            m_webPage->drawPageOverlay(pageOverlayLayer.key, graphicsContext, IntRect(clipRect));

ditto.

> Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:196
> +            m_webPage->drawPageOverlay(overlayAndLayer.key, graphicsContext, IntRect(clipRect));

ditto

> Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:363
> +            m_webPage->drawPageOverlay(it->key, graphicsContext, IntRect(clipRect));

ditto.
Comment 7 zalan 2014-02-11 14:47:43 PST
Created attachment 223902 [details]
Patch
Comment 8 Simon Fraser (smfr) 2014-02-11 14:52:07 PST
Comment on attachment 223902 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=223902&action=review

> Source/WebCore/ChangeLog:10
> +        This is the first step in transitioning to subpixel render layer offsetting from 
> +        the integral positioned graphics layer.
> +

You should say what you changed.
Comment 9 zalan 2014-02-11 15:03:32 PST
Created attachment 223906 [details]
Patch
Comment 10 zalan 2014-02-11 15:03:55 PST
Comment on attachment 223906 [details]
Patch

EWS testing
Comment 11 WebKit Commit Bot 2014-02-11 19:23:41 PST
Comment on attachment 223906 [details]
Patch

Clearing flags on attachment: 223906

Committed r163931: <http://trac.webkit.org/changeset/163931>
Comment 12 WebKit Commit Bot 2014-02-11 19:23:44 PST
All reviewed patches have been landed.  Closing bug.