[WK2] allow up to 40 graphics layers
authorSeojin Kim <seojin.kim@samsung.com>
Sun, 9 Sep 2012 10:16:21 +0000 (19:16 +0900)
committerSeojin Kim <seojin.kim@samsung.com>
Sun, 9 Sep 2012 10:22:20 +0000 (19:22 +0900)
[Title] [WK2] allow up to 40 graphics layers
[Issue #] N_SE-9731
[Problem] lockup when try to Reply the mail in gmail desktop site.
[Cause] Too many layers are created in gmail desktop site, and moreover, contents forcely triggers relayout and paint infinitely.
[Solution] Set limit up to 40 layers.
[Developer] seojin.kim

Source/WebCore/rendering/RenderLayerCompositor.cpp

index ff4e359..2d5384a 100644 (file)
@@ -1470,10 +1470,6 @@ bool RenderLayerCompositor::requiresCompositingLayer(const RenderLayer* layer) c
         layer = toRenderBoxModelObject(renderer)->layer();
     }
 
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC)
-    if (m_compositedLayerCount > 100)
-        return false;
-#endif
 
     // The root layer always has a compositing layer, but it may not have backing.
     return requiresCompositingForTransform(renderer)
@@ -1494,6 +1490,11 @@ bool RenderLayerCompositor::requiresCompositingLayer(const RenderLayer* layer) c
 
 bool RenderLayerCompositor::canBeComposited(const RenderLayer* layer) const
 {
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC)
+    if (m_compositedLayerCount > 40)
+        return false;
+#endif
+
     // FIXME: We disable accelerated compositing for elements in a RenderFlowThread as it doesn't work properly.
     // See http://webkit.org/b/84900 to re-enable it.
     return m_hasAcceleratedCompositing && layer->isSelfPaintingLayer() && !layer->renderer()->inRenderFlowThread();