Changeset 52202 in webkit


Ignore:
Timestamp:
Dec 16, 2009 10:12:55 AM (14 years ago)
Author:
eric@webkit.org
Message:

2009-12-16 Dirk Schulze <krit@webkit.org>

Reviewed by Darin Adler.

sourceGraphic wrong if positive x,y is >0 and objectBB is selected on Filter
https://bugs.webkit.org/show_bug.cgi?id=32575

Check if the GraphicsContex get adjusted, if the source rect is clipped
to the filter rect.

  • platform/mac/svg/filters/filter-source-position-expected.checksum: Added.
  • platform/mac/svg/filters/filter-source-position-expected.png: Added.
  • platform/mac/svg/filters/filter-source-position-expected.txt: Added.
  • svg/filters/filter-source-position.svg: Added.

2009-12-16 Dirk Schulze <krit@webkit.org>

Reviewed by Darin Adler.

sourceGraphic wrong if positive x,y is >0 and objectBB is selected on Filter
https://bugs.webkit.org/show_bug.cgi?id=32575

On SVG Filters, the rest of the source graphic gets clipped to the filter
rest. This helps us to minimize the size of intermediate ImageBuffers. If
the position moves to the right or to the bottom, we have to adjust the
GraphicContext of this intermediate ImageBuffer.
This patch fixes the adjustment of the context, according to the clipping.

Test: svg/filters/filter-source-position.svg

  • svg/graphics/SVGResourceFilter.cpp: (WebCore::SVGResourceFilter::prepareFilter):
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r52201 r52202  
     12009-12-16  Dirk Schulze  <krit@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        sourceGraphic wrong if positive x,y is >0 and objectBB is selected on Filter
     6        https://bugs.webkit.org/show_bug.cgi?id=32575
     7
     8        Check if the GraphicsContex get adjusted, if the source rect is clipped
     9        to the filter rect.
     10
     11        * platform/mac/svg/filters/filter-source-position-expected.checksum: Added.
     12        * platform/mac/svg/filters/filter-source-position-expected.png: Added.
     13        * platform/mac/svg/filters/filter-source-position-expected.txt: Added.
     14        * svg/filters/filter-source-position.svg: Added.
     15
    1162009-12-16  Enrica Casucci  <enrica@apple.com>
    217
  • trunk/WebCore/ChangeLog

    r52201 r52202  
     12009-12-16  Dirk Schulze  <krit@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        sourceGraphic wrong if positive x,y is >0 and objectBB is selected on Filter
     6        https://bugs.webkit.org/show_bug.cgi?id=32575
     7
     8        On SVG Filters, the rest of the source graphic gets clipped to the filter
     9        rest. This helps us to minimize the size of intermediate ImageBuffers. If
     10        the position moves to the right or to the bottom, we have to adjust the
     11        GraphicContext of this intermediate ImageBuffer.
     12        This patch fixes the adjustment of the context, according to the clipping.
     13
     14        Test: svg/filters/filter-source-position.svg
     15
     16        * svg/graphics/SVGResourceFilter.cpp:
     17        (WebCore::SVGResourceFilter::prepareFilter):
     18
    1192009-12-16  Enrica Casucci  <enrica@apple.com>
    220
  • trunk/WebCore/svg/graphics/SVGResourceFilter.cpp

    r51310 r52202  
    136136
    137137    GraphicsContext* sourceGraphicContext = sourceGraphic->context();
     138    sourceGraphicContext->translate(-clippedSourceRect.x(), -clippedSourceRect.y());
    138139    sourceGraphicContext->scale(FloatSize(m_scaleX, m_scaleY));
    139     sourceGraphicContext->translate(-targetRect.x(), -targetRect.y());
    140140    sourceGraphicContext->clearRect(FloatRect(FloatPoint(), targetRect.size()));
    141141    m_sourceGraphicBuffer.set(sourceGraphic.release());
Note: See TracChangeset for help on using the changeset viewer.