Title: [120577] trunk/Source/WebCore
Revision
120577
Author
ser...@webkit.org
Date
2012-06-18 01:12:50 -0700 (Mon, 18 Jun 2012)

Log Message

TextureMapperLayer: invisible layers do not let their children to be painted
https://bugs.webkit.org/show_bug.cgi?id=88786

Reviewed by Noam Rosenthal.

Do not early discard recursively painting children layers if the
current layer is not visible.

Changes already covered by compositing tests. This fixes both
compositing/backface-visibility/backface-visibility-3d.html and
compositing/backface-visibility/backface-visibility-non3d.html.

* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::computeTransformsRecursive):
(WebCore::TextureMapperLayer::paintSelf):
(WebCore::TextureMapperLayer::isVisible):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (120576 => 120577)


--- trunk/Source/WebCore/ChangeLog	2012-06-18 07:25:43 UTC (rev 120576)
+++ trunk/Source/WebCore/ChangeLog	2012-06-18 08:12:50 UTC (rev 120577)
@@ -1,3 +1,22 @@
+2012-06-18  Sergio Villar Senin  <svil...@igalia.com>
+
+        TextureMapperLayer: invisible layers do not let their children to be painted
+        https://bugs.webkit.org/show_bug.cgi?id=88786
+
+        Reviewed by Noam Rosenthal.
+
+        Do not early discard recursively painting children layers if the
+        current layer is not visible.
+
+        Changes already covered by compositing tests. This fixes both
+        compositing/backface-visibility/backface-visibility-3d.html and
+        compositing/backface-visibility/backface-visibility-non3d.html.
+
+        * platform/graphics/texmap/TextureMapperLayer.cpp:
+        (WebCore::TextureMapperLayer::computeTransformsRecursive):
+        (WebCore::TextureMapperLayer::paintSelf):
+        (WebCore::TextureMapperLayer::isVisible):
+
 2012-06-15  Kinuko Yasuda  <kin...@chromium.org>
 
         XHR_RESPONSE_BLOB is not enabled on some platforms

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


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp	2012-06-18 07:25:43 UTC (rev 120576)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp	2012-06-18 08:12:50 UTC (rev 120577)
@@ -77,7 +77,7 @@
         parentTransform = m_effectTarget->m_transform.combined();
     m_transform.combineTransforms(parentTransform);
 
-    m_state.visible = m_state.backfaceVisibility || m_transform.combined().inverse().m33() >= 0;
+    m_state.visible = m_state.backfaceVisibility || !m_transform.combined().isBackFaceVisible();
 
     if (m_parent && m_parent->m_state.preserves3D)
         m_centerZ = m_transform.combined().mapPoint(FloatPoint3D(m_size.width() / 2, m_size.height() / 2, 0)).z();
@@ -154,6 +154,9 @@
 
 void TextureMapperLayer::paintSelf(const TextureMapperPaintOptions& options)
 {
+    if (!m_state.visible)
+        return;
+
     // We apply the following transform to compensate for painting into a surface, and then apply the offset so that the painting fits in the target rect.
     TransformationMatrix transform;
     transform.translate(options.offset.width(), options.offset.height());
@@ -286,8 +289,10 @@
 {
     if (m_size.isEmpty() && (m_state.masksToBounds || m_state.maskLayer || m_children.isEmpty()))
         return false;
-    if (!m_state.visible || m_opacity < 0.01)
+    if (!m_state.visible && m_children.isEmpty())
         return false;
+    if (m_opacity < 0.01)
+        return false;
     return true;
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to