Changeset 171165 in webkit


Ignore:
Timestamp:
Jul 16, 2014 6:47:10 PM (10 years ago)
Author:
Alan Bujtas
Message:

Subpixel rendering: Adjust cliprect with devicePixelFractionFromRenderer() before painting.
https://bugs.webkit.org/show_bug.cgi?id=134950
<rdar://problem/17617994>

Reviewed by Simon Fraser.

The cliprect coming from the graphics layer needs to be adjusted with the subpixel gap
from renderer. This is symmetric with the offsetting we do, when the dirty rect is sent off to the GraphicsLayer.
It puts us back to the correct coordinating system for intersecting with renderers.

Source/WebCore:
Test: compositing/hidpi-compositing-layer-with-tile-layers-on-subpixel-position.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::beginTransparencyLayers):
(WebCore::RenderLayer::clipToRect):

LayoutTests:

  • compositing/hidpi-compositing-layer-with-tile-layers-on-subpixel-position-expected.html: Added.
  • compositing/hidpi-compositing-layer-with-tile-layers-on-subpixel-position.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r171158 r171165  
     12014-07-16  Zalan Bujtas  <zalan@apple.com>
     2
     3        Subpixel rendering: Adjust cliprect with devicePixelFractionFromRenderer() before painting.
     4        https://bugs.webkit.org/show_bug.cgi?id=134950
     5        <rdar://problem/17617994>
     6
     7        Reviewed by Simon Fraser.
     8
     9        The cliprect coming from the graphics layer needs to be adjusted with the subpixel gap
     10        from renderer. This is symmetric with the offsetting we do, when the dirty rect is sent off to the GraphicsLayer.
     11        It puts us back to the correct coordinating system for intersecting with renderers.
     12
     13        * compositing/hidpi-compositing-layer-with-tile-layers-on-subpixel-position-expected.html: Added.
     14        * compositing/hidpi-compositing-layer-with-tile-layers-on-subpixel-position.html: Added.
     15
    1162014-07-16  Roger Fong  <roger_fong@apple.com>
    217
  • trunk/Source/WebCore/ChangeLog

    r171163 r171165  
     12014-07-16  Zalan Bujtas  <zalan@apple.com>
     2
     3        Subpixel rendering: Adjust cliprect with devicePixelFractionFromRenderer() before painting.
     4        https://bugs.webkit.org/show_bug.cgi?id=134950
     5        <rdar://problem/17617994>
     6
     7        Reviewed by Simon Fraser.
     8
     9        The cliprect coming from the graphics layer needs to be adjusted with the subpixel gap
     10        from renderer. This is symmetric with the offsetting we do, when the dirty rect is sent off to the GraphicsLayer.
     11        It puts us back to the correct coordinating system for intersecting with renderers.
     12
     13        Test: compositing/hidpi-compositing-layer-with-tile-layers-on-subpixel-position.html
     14
     15        * rendering/RenderLayer.cpp:
     16        (WebCore::RenderLayer::beginTransparencyLayers):
     17        (WebCore::RenderLayer::clipToRect):
     18
    1192014-07-16  Simon Fraser  <simon.fraser@apple.com>
    220
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r171100 r171165  
    21822182
    21832183    // The dirtyRect is in the coords of the painting root.
    2184     IntRect dirtyRect = enclosingIntRect(clip);
     2184    FloatRect adjustedClipRect = clip;
     2185    adjustedClipRect.move(-m_devicePixelFractionFromRenderer);
     2186    IntRect dirtyRect = enclosingIntRect(adjustedClipRect);
    21852187
    21862188    if (graphicsLayer == m_graphicsLayer.get()
Note: See TracChangeset for help on using the changeset viewer.