Changeset 122975 in webkit


Ignore:
Timestamp:
Jul 18, 2012, 8:13:34 AM (13 years ago)
Author:
kseo@webkit.org
Message:

[Texmap] Make TextureMapperLayer clip m_state.needsDisplayRect with the layerRect.
https://bugs.webkit.org/show_bug.cgi?id=91595

Patch by Huang Dongsung <luxtella@company100.net> on 2012-07-18
Reviewed by Noam Rosenthal.

Internal review by Kwang Yul Seo.

Currently, TextureMapperLayer creates an ImageBuffer as big as
m_state.needsDisplayRect if m_state.needsDispaly is false. The size of
m_state.needsDisplayRect can be bigger than the size of the layerRect, so we may
consume more memory than the size of the layerRect. It even can cause crash if
m_state.needsDisplayRect is too big.

No new tests, covered by existing tests.

  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::updateBackingStore):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r122972 r122975  
     12012-07-18  Huang Dongsung  <luxtella@company100.net>
     2
     3        [Texmap] Make TextureMapperLayer clip m_state.needsDisplayRect with the layerRect.
     4        https://bugs.webkit.org/show_bug.cgi?id=91595
     5
     6        Reviewed by Noam Rosenthal.
     7
     8        Internal review by Kwang Yul Seo.
     9
     10        Currently, TextureMapperLayer creates an ImageBuffer as big as
     11        m_state.needsDisplayRect if m_state.needsDispaly is false. The size of
     12        m_state.needsDisplayRect can be bigger than the size of the layerRect, so we may
     13        consume more memory than the size of the layerRect. It even can cause crash if
     14        m_state.needsDisplayRect is too big.
     15
     16        No new tests, covered by existing tests.
     17
     18        * platform/graphics/texmap/TextureMapperLayer.cpp:
     19        (WebCore::TextureMapperLayer::updateBackingStore):
     20
    1212012-07-18  Jason Liu  <jason.liu@torchmobile.com.cn>
    222
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp

    r122202 r122975  
    109109    }
    110110
    111     IntRect dirtyRect = enclosingIntRect(m_state.needsDisplay ? layerRect() : m_state.needsDisplayRect);
     111    IntRect dirtyRect = enclosingIntRect(layerRect());
     112    if (!m_state.needsDisplay)
     113        dirtyRect.intersect(enclosingIntRect(m_state.needsDisplayRect));
    112114    if (dirtyRect.isEmpty())
    113115        return;
Note: See TracChangeset for help on using the changeset viewer.