Title: [124544] trunk/Source/WebCore
Revision
124544
Author
[email protected]
Date
2012-08-02 18:14:59 -0700 (Thu, 02 Aug 2012)

Log Message

[BlackBerry] Upstream GraphicsLayerClient::contentsVisible()
https://bugs.webkit.org/show_bug.cgi?id=93040

Patch by Arvid Nilsson <[email protected]> on 2012-08-02
Reviewed by George Staikos.

Our LayerTiler uses both proactive and reactive rendering to populate
tiles. If contentsVisible() is accurate, it will cause the right tiles
to be rendered. Failing that, when a dirty tile is found to be visible
on the compositing thread, a render job is scheduled.

This is not currently testable using BlackBerry testing infrastructure.

* platform/graphics/GraphicsLayerClient.h:
(GraphicsLayerClient): New BlackBerry-specific method "contentsVisible" added.
* rendering/RenderLayerBacking.cpp:
(WebCore):
(WebCore::RenderLayerBacking::contentsVisible): BlackBerry-specific implementation.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (124543 => 124544)


--- trunk/Source/WebCore/ChangeLog	2012-08-03 00:51:39 UTC (rev 124543)
+++ trunk/Source/WebCore/ChangeLog	2012-08-03 01:14:59 UTC (rev 124544)
@@ -1,3 +1,23 @@
+2012-08-02  Arvid Nilsson  <[email protected]>
+
+        [BlackBerry] Upstream GraphicsLayerClient::contentsVisible()
+        https://bugs.webkit.org/show_bug.cgi?id=93040
+
+        Reviewed by George Staikos.
+
+        Our LayerTiler uses both proactive and reactive rendering to populate
+        tiles. If contentsVisible() is accurate, it will cause the right tiles
+        to be rendered. Failing that, when a dirty tile is found to be visible
+        on the compositing thread, a render job is scheduled.
+
+        This is not currently testable using BlackBerry testing infrastructure.
+
+        * platform/graphics/GraphicsLayerClient.h:
+        (GraphicsLayerClient): New BlackBerry-specific method "contentsVisible" added.
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore):
+        (WebCore::RenderLayerBacking::contentsVisible): BlackBerry-specific implementation.
+
 2012-08-02  Alexandre Elias  <[email protected]>
 
         [chromium] deviceViewportSize cleanup

Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h (124543 => 124544)


--- trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h	2012-08-03 00:51:39 UTC (rev 124543)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h	2012-08-03 01:14:59 UTC (rev 124544)
@@ -84,6 +84,10 @@
     // while painting.
     virtual void verifyNotPainting() { }
 #endif
+
+#if PLATFORM(BLACKBERRY)
+    virtual bool contentsVisible(const GraphicsLayer*, const IntRect& contentRect) const = 0;
+#endif
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (124543 => 124544)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2012-08-03 00:51:39 UTC (rev 124543)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2012-08-03 01:14:59 UTC (rev 124544)
@@ -1619,6 +1619,20 @@
     return backingMemory;
 }
 
+#if PLATFORM(BLACKBERRY)
+bool RenderLayerBacking::contentsVisible(const GraphicsLayer*, const IntRect& localContentRect) const
+{
+    Frame* frame = renderer()->frame();
+    FrameView* view = frame ? frame->view() : 0;
+    if (!view)
+        return false;
+
+    IntRect visibleContentRect(view->visibleContentRect());
+    FloatQuad absoluteContentQuad = renderer()->localToAbsoluteQuad(FloatRect(localContentRect));
+    return absoluteContentQuad.enclosingBoundingBox().intersects(visibleContentRect);
+}
+#endif
+
 } // namespace WebCore
 
 #endif // USE(ACCELERATED_COMPOSITING)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to