Changeset 90887 in webkit


Ignore:
Timestamp:
Jul 12, 2011 10:35:15 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

[Chromium] Use nearest filter method with pixel aligned transforms.
https://bugs.webkit.org/show_bug.cgi?id=64338

Patch by David Reveman <reveman@chromium.org> on 2011-07-12
Reviewed by James Robinson.

Source/WebCore:

Check for integer translation and use nearest texture filter when
possible to avoid filter precisions problems at the layer edges.

Test: compositing/iframes/nested-iframe-scrolling.html (existing)

  • platform/graphics/chromium/LayerTilerChromium.cpp:

(WebCore::LayerTilerChromium::drawTiles):

  • platform/graphics/transforms/TransformationMatrix.cpp:

(WebCore::TransformationMatrix::isIntegerTranslation):

  • platform/graphics/transforms/TransformationMatrix.h:

LayoutTests:

Update expected results.

  • platform/chromium/test_expectations.txt:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r90883 r90887  
     12011-07-12  David Reveman  <reveman@chromium.org>
     2
     3        [Chromium] Use nearest filter method with pixel aligned transforms.
     4        https://bugs.webkit.org/show_bug.cgi?id=64338
     5
     6        Reviewed by James Robinson.
     7
     8        Update expected results.
     9
     10        * platform/chromium/test_expectations.txt:
     11
    1122011-07-12  Filip Pizlo  <fpizlo@apple.com>
    213
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r90856 r90887  
    28962896
    28972897// Chromium GPU draws scrollbars slightly differently in debug vs. release.
    2898 // Commented because of BUGWK61388
    2899 //BUGWK58587 DEBUG GPU LINUX : compositing/direct-image-compositing.html = IMAGE
    2900 //BUGWK58587 DEBUG GPU LINUX : compositing/geometry/horizontal-scroll-composited.html = IMAGE
    2901 //BUGWK58587 DEBUG GPU LINUX : compositing/geometry/tall-page-composited.html = IMAGE
    2902 //BUGWK58587 DEBUG GPU LINUX : compositing/geometry/video-fixed-scrolling.html = IMAGE
    2903 //BUGWK58587 DEBUG GPU LINUX : media/video-zoom.html = IMAGE
     2898BUGWK58587 DEBUG GPU LINUX : compositing/direct-image-compositing.html = IMAGE
     2899BUGWK58587 DEBUG GPU LINUX : compositing/geometry/horizontal-scroll-composited.html = IMAGE
     2900BUGWK58587 DEBUG GPU LINUX : compositing/geometry/tall-page-composited.html = IMAGE
     2901BUGWK58587 DEBUG GPU LINUX : compositing/geometry/video-fixed-scrolling.html = IMAGE
     2902BUGWK58587 DEBUG GPU LINUX : media/video-zoom.html = IMAGE
    29042903
    29052904// WebKit roll 80564:80631: rendering on Leopard is shifted to the top right
     
    32253224
    32263225BUGWK58308 GPU WIN LINUX DEBUG : compositing/z-order/negative-z-index.html = PASS CRASH
    3227 // Commented because of BUGWK61388
    3228 //BUGWK58328 GPU WIN MAC LINUX DEBUG : compositing/webgl/webgl-reflection.html = IMAGE PASS CRASH
     3226BUGWK58328 GPU WIN MAC LINUX DEBUG : compositing/webgl/webgl-reflection.html = IMAGE PASS CRASH
    32293227
    32303228BUGCR79173 GPU LINUX DEBUG : fast/canvas/access-zero-sized-canvas.html = PASS CRASH
     
    33843382BUGWK60097 DEBUG : fast/dom/HTMLLinkElement/link-and-subresource-test.html = TEXT PASS
    33853383
    3386 // Commented because of BUGWK61388
    3387 //BUGWK60102 LINUX DEBUG GPU : compositing/geometry/fixed-in-composited.html = IMAGE
     3384BUGWK60102 LINUX DEBUG GPU : compositing/geometry/fixed-in-composited.html = IMAGE
    33883385BUGWK60102 LINUX GPU : compositing/masks/masked-ancestor.html = IMAGE
    3389 // Commented because of BUGWK61388
    3390 //BUGWK60102 LINUX DEBUG GPU : compositing/masks/simple-composited-mask.html = IMAGE
     3386BUGWK60102 LINUX DEBUG GPU : compositing/masks/simple-composited-mask.html = IMAGE
    33913387
    33923388// Looks like some uninitialized memory at the bottom.
     
    38503846
    38513847// Started failing at WebKit r90259-90261.
    3852 // Commented because of BUGWK61388
    3853 //BUGCR88400 GPU : compositing/geometry/vertical-scroll-composited.html = IMAGE
     3848BUGCR88400 GPU : compositing/geometry/vertical-scroll-composited.html = IMAGE
    38543849
    38553850// Started around WebKit r90233:r90242
     
    38853880
    38863881BUGWK61388 GPU : compositing/color-matching/image-color-matching.html = IMAGE
    3887 BUGWK61388 WIN LINUX GPU : compositing/direct-image-compositing.html = IMAGE
    3888 BUGWK61388 GPU : compositing/geometry/fixed-in-composited.html = IMAGE
    38893882BUGWK61388 GPU : compositing/geometry/fixed-position.html = IMAGE
    3890 BUGWK61388 GPU : compositing/geometry/horizontal-scroll-composited.html = IMAGE
    38913883BUGWK61388 GPU : compositing/geometry/layer-due-to-layer-children-deep.html = IMAGE
    38923884BUGWK61388 GPU : compositing/geometry/layer-due-to-layer-children.html = IMAGE
    3893 BUGWK61388 WIN LINUX GPU : compositing/geometry/tall-page-composited.html = IMAGE
    3894 BUGWK61388 GPU : compositing/geometry/video-fixed-scrolling.html = IMAGE
    3895 BUGWK61388 GPU : compositing/geometry/vertical-scroll-composited.html = IMAGE
    3896 BUGWK61388 GPU : compositing/geometry/video-opacity-overlay.html = IMAGE
    3897 BUGWK61388 GPU : compositing/iframes/nested-iframe-scrolling.html = IMAGE
    3898 BUGWK61388 GPU : compositing/masks/direct-image-mask.html = IMAGE
    3899 BUGWK61388 GPU : compositing/masks/simple-composited-mask.html = IMAGE
    39003885BUGWK61388 GPU : compositing/overflow/fixed-position-ancestor-clip.html = IMAGE
    3901 BUGWK61388 GPU : compositing/reflections/deeply-nested-reflections.html = IMAGE
    3902 BUGWK61388 GPU : compositing/reflections/nested-reflection-on-overflow.html = IMAGE
    3903 BUGWK61388 GPU : compositing/reflections/nested-reflection-transformed.html = IMAGE
    3904 BUGWK61388 GPU : compositing/reflections/nested-reflection-transformed2.html = IMAGE
    39053886BUGWK61388 GPU : compositing/reflections/nested-reflection-transition.html = IMAGE
    3906 BUGWK61388 GPU : compositing/reflections/reflection-in-composited.html = IMAGE
    3907 BUGWK61388 GPU : compositing/reflections/reflection-on-composited.html = IMAGE
    3908 BUGWK61388 GPU : compositing/reflections/reflection-ordering.html = IMAGE
    3909 BUGWK61388 GPU : compositing/reflections/reflection-positioning.html = IMAGE
    3910 BUGWK61388 GPU : compositing/reflections/reflection-positioning2.html = IMAGE
    3911 BUGWK61388 GPU : compositing/reflections/simple-composited-reflections.html = IMAGE
    39123887BUGWK61388 GPU : compositing/reflections/transform-inside-reflection.html = IMAGE
    3913 BUGWK61388 GPU : compositing/rtl/rtl-iframe-absolute-overflow.html = IMAGE
    3914 BUGWK61388 GPU : compositing/rtl/rtl-iframe-fixed-overflow.html = IMAGE
    39153888BUGWK61388 GPU : compositing/shadows/shadow-drawing.html = IMAGE
    3916 BUGWK61388 GPU : compositing/text-on-large-layer.html = IMAGE
    39173889BUGWK61388 GPU : compositing/transitions/scale-transition-no-start.html = IMAGE
    3918 BUGWK61388 GPU : compositing/webgl/webgl-reflection.html = IMAGE
     3890BUGWK61388 GPU : platform/chromium/compositing/backface-visibility-transformed.html = IMAGE
    39193891BUGWK61388 GPU : platform/chromium/compositing/huge-layer-rotated.html = IMAGE
    3920 BUGWK61388 GPU : platform/chromium/compositing/backface-visibility-transformed.html = IMAGE
    3921 BUGWK61388 WIN LINUX GPU : media/video-zoom.html = IMAGE
     3892BUGWK61388 GPU : media/video-transformed.html = IMAGE
    39223893BUGWK61388 GPU : media/video-zoom-controls.html = IMAGE
    3923 BUGWK61388 GPU : media/video-transformed.html = IMAGE
    3924 BUGWK61388 GPU : media/video-layer-crash.html = IMAGE
    3925 BUGWK61388 WIN GPU : compositing/iframes/composited-iframe-alignment.html = IMAGE
    3926 BUGWK61388 WIN MAC GPU : compositing/masks/masked-ancestor.html = IMAGE
    3927 BUGWK61388 WIN GPU : media/video-controls-rendering.html = IMAGE
    3928 BUGWK61388 WIN MAC GPU : platform/chromium/compositing/layout-width-change.html = IMAGE
    39293894BUGWK61388 WIN MAC GPU : platform/chromium/compositing/tiny-layer-rotated.html = IMAGE
    3930 BUGWK61388 MAC GPU : compositing/masks/multiple-masks.html = IMAGE
    3931 BUGWK61388 MAC GPU : platform/chromium/compositing/perpendicular-layer-sorting.html = IMAGE
    39323895
    39333896// Getting form value is not implemented yet.
  • trunk/Source/WebCore/ChangeLog

    r90886 r90887  
     12011-07-12  David Reveman  <reveman@chromium.org>
     2
     3        [Chromium] Use nearest filter method with pixel aligned transforms.
     4        https://bugs.webkit.org/show_bug.cgi?id=64338
     5
     6        Reviewed by James Robinson.
     7
     8        Check for integer translation and use nearest texture filter when
     9        possible to avoid filter precisions problems at the layer edges.
     10
     11        Test: compositing/iframes/nested-iframe-scrolling.html (existing)
     12
     13        * platform/graphics/chromium/LayerTilerChromium.cpp:
     14        (WebCore::LayerTilerChromium::drawTiles):
     15        * platform/graphics/transforms/TransformationMatrix.cpp:
     16        (WebCore::TransformationMatrix::isIntegerTranslation):
     17        * platform/graphics/transforms/TransformationMatrix.h:
     18
    1192011-07-12  David Reveman  <reveman@chromium.org>
    220
  • trunk/Source/WebCore/platform/graphics/chromium/LayerTilerChromium.cpp

    r90886 r90887  
    501501    bottomEdge.move(0, 0, zDistance);
    502502
     503    GC3Dint filter = (m_tilingData.borderTexels() && !matrix.isIntegerTranslation()) ? GraphicsContext3D::LINEAR : GraphicsContext3D::NEAREST;
     504
    503505    Edge prevEdgeY = topEdge;
    504506
     
    532534
    533535            tile->texture()->bindTexture();
     536            GLC(context, context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MIN_FILTER, filter));
     537            GLC(context, context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MAG_FILTER, filter));
    534538
    535539            // Don't use tileContentRect here, as that contains the full
  • trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp

    r76537 r90887  
    11271127}
    11281128
    1129 }
     1129bool TransformationMatrix::isIntegerTranslation() const
     1130{
     1131    if (!isIdentityOrTranslation())
     1132        return false;
     1133
     1134    // Check for translate Z.
     1135    if (m_matrix[3][2])
     1136        return false;
     1137
     1138    // Check for non-integer translate X/Y.
     1139    if (static_cast<int>(m_matrix[3][0]) != m_matrix[3][0] || static_cast<int>(m_matrix[3][1]) != m_matrix[3][1])
     1140        return false;
     1141
     1142    return true;
     1143}
     1144
     1145}
  • trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.h

    r84104 r90887  
    340340    }
    341341
     342    bool isIntegerTranslation() const;
     343
    342344private:
    343345    // multiply passed 2D point by matrix (assume z=0)
Note: See TracChangeset for help on using the changeset viewer.