Changeset 88822 in webkit


Ignore:
Timestamp:
Jun 14, 2011 10:44:45 AM (13 years ago)
Author:
enne@google.com
Message:

2011-06-13 Adrienne Walker <enne@google.com>

Reviewed by James Robinson.

[chromium] Disable drawing for huge mask layers
https://bugs.webkit.org/show_bug.cgi?id=62607

  • platform/chromium/compositing/huge-mask-layer-expected.txt: Added.
  • platform/chromium/compositing/huge-mask-layer.html: Added.

2011-06-13 Adrienne Walker <enne@google.com>

Reviewed by James Robinson.

[chromium] Disable drawing for huge mask layers
https://bugs.webkit.org/show_bug.cgi?id=62607

Because masks have a different layer size than the layer they are
masking, they are untiled. If they are too large to be contained
within a single texture, then they should just be disabled.

Test: platform/chromium/compositing/huge-mask-layer.html

  • platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::drawsContent): (WebCore::ContentLayerChromium::paintContentsIfDirty):
  • platform/graphics/chromium/LayerTilerChromium.h: (WebCore::LayerTilerChromium::getSingleTexture): (WebCore::LayerTilerChromium::numTiles):
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r88817 r88822  
     12011-06-13  Adrienne Walker  <enne@google.com>
     2
     3        Reviewed by James Robinson.
     4
     5        [chromium] Disable drawing for huge mask layers
     6        https://bugs.webkit.org/show_bug.cgi?id=62607
     7
     8        * platform/chromium/compositing/huge-mask-layer-expected.txt: Added.
     9        * platform/chromium/compositing/huge-mask-layer.html: Added.
     10
    1112011-06-14  Dimitri Glazkov  <dglazkov@chromium.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r88816 r88822  
     12011-06-13  Adrienne Walker  <enne@google.com>
     2
     3        Reviewed by James Robinson.
     4
     5        [chromium] Disable drawing for huge mask layers
     6        https://bugs.webkit.org/show_bug.cgi?id=62607
     7
     8        Because masks have a different layer size than the layer they are
     9        masking, they are untiled.  If they are too large to be contained
     10        within a single texture, then they should just be disabled.
     11
     12        Test: platform/chromium/compositing/huge-mask-layer.html
     13
     14        * platform/graphics/chromium/ContentLayerChromium.cpp:
     15        (WebCore::ContentLayerChromium::drawsContent):
     16        (WebCore::ContentLayerChromium::paintContentsIfDirty):
     17        * platform/graphics/chromium/LayerTilerChromium.h:
     18        (WebCore::LayerTilerChromium::getSingleTexture):
     19        (WebCore::LayerTilerChromium::numTiles):
     20
    1212011-06-14  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
    222
  • trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp

    r87822 r88822  
    110110    m_tiler->invalidateRect(dirty);
    111111
     112    if (!drawsContent())
     113        return;
     114
    112115    m_tiler->prepareToUpdate(layerRect);
    113116    m_dirtyRect = FloatRect();
     
    219222bool ContentLayerChromium::drawsContent() const
    220223{
    221     return m_owner && m_owner->drawsContent() && (!m_tiler || !m_tiler->skipsDraw());
     224    if (!m_owner || !m_owner->drawsContent())
     225        return false;
     226
     227    if (!m_tiler)
     228        return true;
     229
     230    if (m_tilingOption == NeverTile && m_tiler->numTiles() > 1)
     231        return false;
     232
     233    return !m_tiler->skipsDraw();
    222234}
    223235
  • trunk/Source/WebCore/platform/graphics/chromium/LayerTilerChromium.cpp

    r88577 r88822  
    8484LayerTexture* LayerTilerChromium::getSingleTexture()
    8585{
     86    if (m_tilingData.numTiles() != 1)
     87        return 0;
     88
    8689    Tile* tile = tileAt(0, 0);
    8790    return tile ? tile->texture() : 0;
  • trunk/Source/WebCore/platform/graphics/chromium/LayerTilerChromium.h

    r86805 r88822  
    6161    // Draw all tiles that intersect with the content rect.
    6262    void draw(const IntRect& contentRect, const TransformationMatrix&, float opacity);
     63
     64    int numTiles() const { return m_tilingData.numTiles(); }
    6365
    6466    // Set position of this tiled layer in content space.
Note: See TracChangeset for help on using the changeset viewer.