Title: [152132] trunk/Source/WebCore
Revision
152132
Author
commit-qu...@webkit.org
Date
2013-06-27 15:40:32 -0700 (Thu, 27 Jun 2013)

Log Message

[BlackBerry] Unnecessary root layer commits occur during html5 video playback
https://bugs.webkit.org/show_bug.cgi?id=118147

Patch by Andrew Lo <a...@blackberry.com> on 2013-06-27
Reviewed by Rob Buis.
Internally reviewed by Arvid Nilsson, John Griggs.

Only request layer commits when layer properties change in
GraphicsLayerBlackBerry::updateContentsRect and
GraphicsLayerBlackBerry::setContentsToMedia.
JIRA112749.

* platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
(WebCore::GraphicsLayerBlackBerry::setContentsToMedia):
(WebCore::GraphicsLayerBlackBerry::updateContentsRect):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (152131 => 152132)


--- trunk/Source/WebCore/ChangeLog	2013-06-27 22:33:47 UTC (rev 152131)
+++ trunk/Source/WebCore/ChangeLog	2013-06-27 22:40:32 UTC (rev 152132)
@@ -1,3 +1,20 @@
+2013-06-27  Andrew Lo  <a...@blackberry.com>
+
+        [BlackBerry] Unnecessary root layer commits occur during html5 video playback
+        https://bugs.webkit.org/show_bug.cgi?id=118147
+
+        Reviewed by Rob Buis.
+        Internally reviewed by Arvid Nilsson, John Griggs.
+
+        Only request layer commits when layer properties change in
+        GraphicsLayerBlackBerry::updateContentsRect and
+        GraphicsLayerBlackBerry::setContentsToMedia.
+        JIRA112749.
+
+        * platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
+        (WebCore::GraphicsLayerBlackBerry::setContentsToMedia):
+        (WebCore::GraphicsLayerBlackBerry::updateContentsRect):
+
 2013-06-27  Bem Jones-Bey  <bjone...@adobe.com>
 
         [CSS Shapes] New positioning model: basic support for rectangle shape-outside

Modified: trunk/Source/WebCore/platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp (152131 => 152132)


--- trunk/Source/WebCore/platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp	2013-06-27 22:33:47 UTC (rev 152131)
+++ trunk/Source/WebCore/platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp	2013-06-27 22:40:32 UTC (rev 152132)
@@ -569,8 +569,11 @@
             m_contentsLayerPurpose = ContentsLayerForVideo;
             childrenChanged = true;
         }
-        layer->setOwner(this);
-        layer->setNeedsDisplay();
+
+        if (layer->owner() != this) {
+            layer->setOwner(this);
+            layer->setNeedsDisplay();
+        }
         updateContentsRect();
     } else {
         if (m_contentsLayer) {
@@ -854,8 +857,11 @@
     if (!m_contentsLayer)
         return;
 
-    m_contentsLayer->setPosition(m_contentsRect.location());
-    m_contentsLayer->setBounds(m_contentsRect.size());
+    if (m_contentsLayer->position() != m_contentsRect.location())
+        m_contentsLayer->setPosition(m_contentsRect.location());
+
+    if (m_contentsLayer->bounds() != m_contentsRect.size())
+        m_contentsLayer->setBounds(m_contentsRect.size());
 }
 
 void GraphicsLayerBlackBerry::setupContentsLayer(LayerWebKitThread* contentsLayer)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to