Title: [136355] trunk/Source/WebKit2
Revision
136355
Author
commit-qu...@webkit.org
Date
2012-12-02 16:45:10 -0800 (Sun, 02 Dec 2012)

Log Message

REGRESSION(r134376): ASSERT(!m_mainBackingStore) hits in CoordinatedGraphicsLayer::syncImageBacking().
https://bugs.webkit.org/show_bug.cgi?id=103845

Patch by Huang Dongsung <luxte...@company100.net> on 2012-12-02
Reviewed by Noam Rosenthal.

flushCompositingStateForThisLayerOnly() calls syncImageBacking() before calling
updateContentBuffers(). It means there can be the moment that
CoordinatedGraphicsLayer has m_mainBackingStore although
shouldHaveBackingStore() return false.
This patch changes syncImageBacking() to check shouldHaveBackingStore() instead
of m_mainBackingStore.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::syncImageBacking):
(WebCore::CoordinatedGraphicsLayer::adjustContentsScale):
(WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
(WebCore::CoordinatedGraphicsLayer::shouldHaveBackingStore):
(WebCore):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayer):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (136354 => 136355)


--- trunk/Source/WebKit2/ChangeLog	2012-12-03 00:21:45 UTC (rev 136354)
+++ trunk/Source/WebKit2/ChangeLog	2012-12-03 00:45:10 UTC (rev 136355)
@@ -1,3 +1,26 @@
+2012-12-02  Huang Dongsung  <luxte...@company100.net>
+
+        REGRESSION(r134376): ASSERT(!m_mainBackingStore) hits in CoordinatedGraphicsLayer::syncImageBacking().
+        https://bugs.webkit.org/show_bug.cgi?id=103845
+
+        Reviewed by Noam Rosenthal.
+
+        flushCompositingStateForThisLayerOnly() calls syncImageBacking() before calling
+        updateContentBuffers(). It means there can be the moment that
+        CoordinatedGraphicsLayer has m_mainBackingStore although
+        shouldHaveBackingStore() return false.
+        This patch changes syncImageBacking() to check shouldHaveBackingStore() instead
+        of m_mainBackingStore.
+
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
+        (WebCore::CoordinatedGraphicsLayer::syncImageBacking):
+        (WebCore::CoordinatedGraphicsLayer::adjustContentsScale):
+        (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
+        (WebCore::CoordinatedGraphicsLayer::shouldHaveBackingStore):
+        (WebCore):
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
+        (CoordinatedGraphicsLayer):
+
 2012-12-02  Seokju Kwon  <seokju.k...@gmail.com>
 
         Rename WebSocketServerGtk.cpp as WebSocketServerSoup.cpp

Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp (136354 => 136355)


--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp	2012-12-03 00:21:45 UTC (rev 136354)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp	2012-12-03 00:45:10 UTC (rev 136355)
@@ -486,7 +486,7 @@
     m_shouldSyncImageBacking = false;
 
     if (m_compositedNativeImagePtr) {
-        ASSERT(!m_mainBackingStore);
+        ASSERT(!shouldHaveBackingStore());
         ASSERT(m_compositedImage);
 
         bool imageInstanceReplaced = m_coordinatedImageBacking && (m_coordinatedImageBacking->id() != CoordinatedImageBacking::getCoordinatedImageBackingID(m_compositedImage.get()));
@@ -640,7 +640,7 @@
 
 void CoordinatedGraphicsLayer::adjustContentsScale()
 {
-    if (!drawsContent() || !contentsAreVisible() || m_size.isEmpty())
+    if (!shouldHaveBackingStore())
         return;
 
     if (!m_mainBackingStore || m_mainBackingStore->contentsScale() == effectiveContentsScale())
@@ -747,7 +747,7 @@
 
 void CoordinatedGraphicsLayer::updateContentBuffers()
 {
-    if (!drawsContent() || !contentsAreVisible() || m_size.isEmpty()) {
+    if (!shouldHaveBackingStore()) {
         m_mainBackingStore.clear();
         m_previousBackingStore.clear();
         return;
@@ -840,6 +840,11 @@
     GraphicsLayer::setGraphicsLayerFactory(createCoordinatedGraphicsLayer);
 }
 
+bool CoordinatedGraphicsLayer::shouldHaveBackingStore() const
+{
+    return drawsContent() && contentsAreVisible() && !m_size.isEmpty();
+}
+
 bool CoordinatedGraphicsLayer::selfOrAncestorHasActiveTransformAnimation() const
 {
     if (m_animations.hasActiveAnimationsOfType(AnimatedPropertyWebkitTransform))

Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h (136354 => 136355)


--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h	2012-12-03 00:21:45 UTC (rev 136354)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h	2012-12-03 00:45:10 UTC (rev 136355)
@@ -195,6 +195,7 @@
     void destroyCanvasIfNeeded();
     void createCanvasIfNeeded();
 
+    bool shouldHaveBackingStore() const;
     bool selfOrAncestorHasActiveTransformAnimation() const;
     bool selfOrAncestorHaveNonAffineTransforms();
     void adjustContentsScale();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to