OSDN Git Service

allow for compositing of 1x1 plugins
authorChris Craik <ccraik@google.com>
Mon, 3 Oct 2011 21:38:23 +0000 (14:38 -0700)
committerChris Craik <ccraik@google.com>
Mon, 3 Oct 2011 22:34:03 +0000 (15:34 -0700)
bug:5382635

Change-Id: I0da21245ec7808da452941a45ae5008e278f3007

Source/WebCore/rendering/RenderLayerCompositor.cpp

index e757080..4f4f553 100644 (file)
@@ -1533,7 +1533,13 @@ bool RenderLayerCompositor::requiresCompositingForPlugin(RenderObject* renderer)
 
     // Don't go into compositing mode if height or width are zero, or size is 1x1.
     IntRect contentBox = pluginRenderer->contentBoxRect();
+#if PLATFORM(ANDROID)
+    // allow all plugins including 1x1 to be composited, so that they are drawn,
+    // and acquire an ANativeWindow on the UI thread
+    return contentBox.height() * contentBox.width() > 0;
+#else
     return contentBox.height() * contentBox.width() > 1;
+#endif
 }
 
 bool RenderLayerCompositor::requiresCompositingForFrame(RenderObject* renderer) const