Title: [122975] trunk/Source/WebCore
Revision
122975
Author
[email protected]
Date
2012-07-18 08:13:34 -0700 (Wed, 18 Jul 2012)

Log Message

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

Patch by Huang Dongsung <[email protected]> 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (122974 => 122975)


--- trunk/Source/WebCore/ChangeLog	2012-07-18 15:12:26 UTC (rev 122974)
+++ trunk/Source/WebCore/ChangeLog	2012-07-18 15:13:34 UTC (rev 122975)
@@ -1,3 +1,23 @@
+2012-07-18  Huang Dongsung  <[email protected]>
+
+        [Texmap] Make TextureMapperLayer clip m_state.needsDisplayRect with the layerRect.
+        https://bugs.webkit.org/show_bug.cgi?id=91595
+
+        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):
+
 2012-07-18  Jason Liu  <[email protected]>
 
         [BlackBerry] We should update the status in NetworkJob if there is a new one from libcurl.

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp (122974 => 122975)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp	2012-07-18 15:12:26 UTC (rev 122974)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp	2012-07-18 15:13:34 UTC (rev 122975)
@@ -108,7 +108,9 @@
         return;
     }
 
-    IntRect dirtyRect = enclosingIntRect(m_state.needsDisplay ? layerRect() : m_state.needsDisplayRect);
+    IntRect dirtyRect = enclosingIntRect(layerRect());
+    if (!m_state.needsDisplay)
+        dirtyRect.intersect(enclosingIntRect(m_state.needsDisplayRect));
     if (dirtyRect.isEmpty())
         return;
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to