Title: [172681] trunk/Source
Revision
172681
Author
za...@apple.com
Date
2014-08-15 21:03:42 -0700 (Fri, 15 Aug 2014)

Log Message

Do not use FloatRect::infiniteRect() to flag full repaints.
https://bugs.webkit.org/show_bug.cgi?id=135900

Reviewed by Simon Fraser.

Converting FloatRect::infiniteRect() to IntRect leads to value overflow
and we end up with invalid repaint rectangle. Use a boolean flag to indicate
full repaint request.

Covered by existing tests.

Source/WebCore:

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::GraphicsLayerCA):
(WebCore::GraphicsLayerCA::setNeedsDisplay):
(WebCore::GraphicsLayerCA::setNeedsDisplayInRect):
(WebCore::GraphicsLayerCA::repaintLayerDirtyRects):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::setTileNeedsDisplayInRect):
* platform/graphics/ca/mac/PlatformCALayerMac.h:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::setNeedsDisplay):
(PlatformCALayerMac::setNeedsDisplayInRect):

Source/WebKit2:

* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::setNeedsDisplayInRect):
(WebKit::PlatformCALayerRemote::setNeedsDisplay):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
(WebKit::PlatformCALayerRemoteCustom::setNeedsDisplayInRect):
(WebKit::PlatformCALayerRemoteCustom::setNeedsDisplay):
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
(WebKit::PlatformCALayerRemoteTiledBacking::setNeedsDisplayInRect):
(WebKit::PlatformCALayerRemoteTiledBacking::setNeedsDisplay):
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (172680 => 172681)


--- trunk/Source/WebCore/ChangeLog	2014-08-16 02:57:58 UTC (rev 172680)
+++ trunk/Source/WebCore/ChangeLog	2014-08-16 04:03:42 UTC (rev 172681)
@@ -1,3 +1,30 @@
+2014-08-15  Zalan Bujtas  <za...@apple.com>
+
+        Do not use FloatRect::infiniteRect() to flag full repaints.
+        https://bugs.webkit.org/show_bug.cgi?id=135900
+
+        Reviewed by Simon Fraser.
+
+        Converting FloatRect::infiniteRect() to IntRect leads to value overflow
+        and we end up with invalid repaint rectangle. Use a boolean flag to indicate
+        full repaint request.
+
+        Covered by existing tests.
+
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayerCA::GraphicsLayerCA):
+        (WebCore::GraphicsLayerCA::setNeedsDisplay):
+        (WebCore::GraphicsLayerCA::setNeedsDisplayInRect):
+        (WebCore::GraphicsLayerCA::repaintLayerDirtyRects):
+        * platform/graphics/ca/GraphicsLayerCA.h:
+        * platform/graphics/ca/PlatformCALayer.h:
+        * platform/graphics/ca/TileGrid.cpp:
+        (WebCore::TileGrid::setTileNeedsDisplayInRect):
+        * platform/graphics/ca/mac/PlatformCALayerMac.h:
+        * platform/graphics/ca/mac/PlatformCALayerMac.mm:
+        (PlatformCALayerMac::setNeedsDisplay):
+        (PlatformCALayerMac::setNeedsDisplayInRect):
+
 2014-08-15  Benjamin Poulain  <benja...@webkit.org>
 
         Unify the modes style resolution modes SharingRules and StyleInvalidation

Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp (172680 => 172681)


--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp	2014-08-16 02:57:58 UTC (rev 172680)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp	2014-08-16 04:03:42 UTC (rev 172681)
@@ -571,18 +571,19 @@
 
 void GraphicsLayer::addRepaintRect(const FloatRect& repaintRect)
 {
-    if (m_client.isTrackingRepaints()) {
-        FloatRect largestRepaintRect(FloatPoint(), m_size);
-        largestRepaintRect.intersect(repaintRect);
-        RepaintMap::iterator repaintIt = repaintRectMap().find(this);
-        if (repaintIt == repaintRectMap().end()) {
-            Vector<FloatRect> repaintRects;
-            repaintRects.append(largestRepaintRect);
-            repaintRectMap().set(this, repaintRects);
-        } else {
-            Vector<FloatRect>& repaintRects = repaintIt->value;
-            repaintRects.append(largestRepaintRect);
-        }
+    if (!m_client.isTrackingRepaints())
+        return;
+
+    FloatRect largestRepaintRect(FloatPoint(), m_size);
+    largestRepaintRect.intersect(repaintRect);
+    RepaintMap::iterator repaintIt = repaintRectMap().find(this);
+    if (repaintIt == repaintRectMap().end()) {
+        Vector<FloatRect> repaintRects;
+        repaintRects.append(largestRepaintRect);
+        repaintRectMap().set(this, repaintRects);
+    } else {
+        Vector<FloatRect>& repaintRects = repaintIt->value;
+        repaintRects.append(largestRepaintRect);
     }
 }
 

Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (172680 => 172681)


--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp	2014-08-16 02:57:58 UTC (rev 172680)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp	2014-08-16 04:03:42 UTC (rev 172681)
@@ -342,6 +342,7 @@
     : GraphicsLayer(client)
     , m_contentsLayerPurpose(NoContentsLayer)
     , m_isPageTiledBackingLayer(false)
+    , m_needsFullRepaint(false)
     , m_uncommittedChanges(0)
     , m_isCommittingChanges(false)
 {
@@ -709,7 +710,13 @@
 
 void GraphicsLayerCA::setNeedsDisplay()
 {
-    setNeedsDisplayInRect(FloatRect::infiniteRect());
+    if (!drawsContent())
+        return;
+
+    m_needsFullRepaint = true;
+    m_dirtyRects.clear();
+    noteLayerPropertyChanged(DirtyRectsChanged);
+    addRepaintRect(FloatRect(FloatPoint(), m_size));
 }
 
 void GraphicsLayerCA::setNeedsDisplayInRect(const FloatRect& r, ShouldClipToLayer shouldClip)
@@ -717,6 +724,9 @@
     if (!drawsContent())
         return;
 
+    if (m_needsFullRepaint)
+        return;
+
     FloatRect rect(r);
     if (shouldClip == ClipToLayer) {
         FloatRect layerBounds(FloatPoint(), m_size);
@@ -2270,11 +2280,18 @@
 
 void GraphicsLayerCA::repaintLayerDirtyRects()
 {
+    if (m_needsFullRepaint) {
+        ASSERT(!m_dirtyRects.size());
+        m_layer->setNeedsDisplay();
+        m_needsFullRepaint = false;
+        return;
+    }
+
     if (!m_dirtyRects.size())
         return;
 
     for (size_t i = 0; i < m_dirtyRects.size(); ++i)
-        m_layer->setNeedsDisplay(&(m_dirtyRects[i]));
+        m_layer->setNeedsDisplayInRect(m_dirtyRects[i]);
     
     m_dirtyRects.clear();
 }

Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h (172680 => 172681)


--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h	2014-08-16 02:57:58 UTC (rev 172680)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h	2014-08-16 04:03:42 UTC (rev 172681)
@@ -482,7 +482,8 @@
     
     ContentsLayerPurpose m_contentsLayerPurpose;
     bool m_isPageTiledBackingLayer : 1;
-    
+    bool m_needsFullRepaint : 1;
+
     Color m_contentsSolidColor;
 
     RetainPtr<CGImageRef> m_uncorrectedContentsImage;

Modified: trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h (172680 => 172681)


--- trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h	2014-08-16 02:57:58 UTC (rev 172680)
+++ trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h	2014-08-16 04:03:42 UTC (rev 172681)
@@ -103,7 +103,8 @@
 
     virtual void animationStarted(const String& key, CFTimeInterval beginTime) = 0;
 
-    virtual void setNeedsDisplay(const FloatRect* dirtyRect = 0) = 0;
+    virtual void setNeedsDisplay() = 0;
+    virtual void setNeedsDisplayInRect(const FloatRect& dirtyRect) = 0;
 
     virtual void copyContentsFromLayer(PlatformCALayer*) = 0;
 

Modified: trunk/Source/WebCore/platform/graphics/ca/TileGrid.cpp (172680 => 172681)


--- trunk/Source/WebCore/platform/graphics/ca/TileGrid.cpp	2014-08-16 02:57:58 UTC (rev 172680)
+++ trunk/Source/WebCore/platform/graphics/ca/TileGrid.cpp	2014-08-16 04:03:42 UTC (rev 172681)
@@ -152,11 +152,11 @@
     // We could test for intersection with the visible rect. This would reduce painting yet more,
     // but may make scrolling stale tiles into view more frequent.
     if (tileRect.intersects(coverageRectInTileCoords) && tileLayer->superlayer()) {
-        tileLayer->setNeedsDisplay(&tileRepaintRect);
+        tileLayer->setNeedsDisplayInRect(tileRepaintRect);
 
         if (m_controller.rootLayer().owner()->platformCALayerShowRepaintCounter(0)) {
             FloatRect indicatorRect(0, 0, 52, 27);
-            tileLayer->setNeedsDisplay(&indicatorRect);
+            tileLayer->setNeedsDisplayInRect(indicatorRect);
         }
     } else
         tileInfo.hasStaleContent = true;

Modified: trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h (172680 => 172681)


--- trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h	2014-08-16 02:57:58 UTC (rev 172680)
+++ trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h	2014-08-16 04:03:42 UTC (rev 172681)
@@ -46,7 +46,8 @@
 
     virtual void setOwner(PlatformCALayerClient*) override;
 
-    virtual void setNeedsDisplay(const FloatRect* dirtyRect = 0) override;
+    virtual void setNeedsDisplay() override;
+    virtual void setNeedsDisplayInRect(const FloatRect& dirtyRect) override;
 
     virtual void copyContentsFromLayer(PlatformCALayer*) override;
 

Modified: trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm (172680 => 172681)


--- trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm	2014-08-16 02:57:58 UTC (rev 172680)
+++ trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm	2014-08-16 04:03:42 UTC (rev 172681)
@@ -331,16 +331,20 @@
         m_owner->platformCALayerAnimationStarted(beginTime);
 }
 
-void PlatformCALayerMac::setNeedsDisplay(const FloatRect* dirtyRect)
+void PlatformCALayerMac::setNeedsDisplay()
 {
     BEGIN_BLOCK_OBJC_EXCEPTIONS
-    if (dirtyRect)
-        [m_layer.get() setNeedsDisplayInRect:*dirtyRect];
-    else
-        [m_layer.get() setNeedsDisplay];
+    [m_layer.get() setNeedsDisplay];
     END_BLOCK_OBJC_EXCEPTIONS
 }
 
+void PlatformCALayerMac::setNeedsDisplayInRect(const FloatRect& dirtyRect)
+{
+    BEGIN_BLOCK_OBJC_EXCEPTIONS
+    [m_layer.get() setNeedsDisplayInRect:dirtyRect];
+    END_BLOCK_OBJC_EXCEPTIONS
+}
+
 void PlatformCALayerMac::copyContentsFromLayer(PlatformCALayer* layer)
 {
     BEGIN_BLOCK_OBJC_EXCEPTIONS

Modified: trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp (172680 => 172681)


--- trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp	2014-08-16 02:57:58 UTC (rev 172680)
+++ trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp	2014-08-16 04:03:42 UTC (rev 172681)
@@ -208,11 +208,16 @@
         m_owner->platformCALayerAnimationStarted(beginTime);
 }
 
-void PlatformCALayerWin::setNeedsDisplay(const FloatRect* dirtyRect)
+void PlatformCALayerWin::setNeedsDisplayInRect(const FloatRect& dirtyRect)
 {
-    intern(this)->setNeedsDisplay(dirtyRect);
+    intern(this)->setNeedsDisplayInRect(dirtyRect);
 }
-    
+
+void PlatformCALayerWin::setNeedsDisplay()
+{
+    intern(this)->setNeedsDisplay();
+}
+
 void PlatformCALayerWin::setNeedsCommit()
 {
     AbstractCACFLayerTreeHost* host = layerTreeHostForLayer(this);

Modified: trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.h (172680 => 172681)


--- trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.h	2014-08-16 02:57:58 UTC (rev 172680)
+++ trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.h	2014-08-16 04:03:42 UTC (rev 172681)
@@ -37,7 +37,8 @@
     
     ~PlatformCALayerWin();
 
-    virtual void setNeedsDisplay(const FloatRect* dirtyRect = 0) override;
+    virtual void setNeedsDisplayInRect(const FloatRect& dirtyRect) override;
+    virtual void setNeedsDisplay() override;
 
     virtual void copyContentsFromLayer(PlatformCALayer*) override;
 

Modified: trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.cpp (172680 => 172681)


--- trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.cpp	2014-08-16 02:57:58 UTC (rev 172680)
+++ trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.cpp	2014-08-16 04:03:42 UTC (rev 172681)
@@ -160,16 +160,19 @@
         CACFLayerSetNeedsDisplay(owner()->platformLayer(), 0);
 }
 
-void PlatformCALayerWinInternal::setNeedsDisplay(const FloatRect* dirtyRect)
+void PlatformCALayerWinInternal::setNeedsDisplay()
 {
+    internalSetNeedsDisplay(0);
+}
+
+void PlatformCALayerWinInternal::setNeedsDisplayInRect(const FloatRect& dirtyRect)
+{
     if (layerTypeIsTiled(m_owner->layerType())) {
         // FIXME: Only setNeedsDisplay for tiles that are currently visible
         int numTileLayers = tileCount();
-        CGRect rect;
-        if (dirtyRect)
-            rect = *dirtyRect;
+        CGRect rect = dirtyRect;
         for (int i = 0; i < numTileLayers; ++i)
-            CACFLayerSetNeedsDisplay(tileAtIndex(i), dirtyRect ? &rect : 0);
+            CACFLayerSetNeedsDisplay(tileAtIndex(i), &rect);
 
         if (m_owner->owner() && m_owner->owner()->platformCALayerShowRepaintCounter(m_owner)) {
             CGRect layerBounds = m_owner->bounds();
@@ -189,15 +192,15 @@
                     repaintCounterRect.setY(layerBounds.height() - (layerBounds.y() + repaintCounterRect.height()));
                 internalSetNeedsDisplay(&repaintCounterRect);
             }
-            if (dirtyRect && owner()->owner()->platformCALayerContentsOrientation() == WebCore::GraphicsLayer::CompositingCoordinatesTopDown) {
-                FloatRect flippedDirtyRect = *dirtyRect;
+            if (owner()->owner()->platformCALayerContentsOrientation() == WebCore::GraphicsLayer::CompositingCoordinatesTopDown) {
+                FloatRect flippedDirtyRect = dirtyRect;
                 flippedDirtyRect.setY(owner()->bounds().height() - (flippedDirtyRect.y() + flippedDirtyRect.height()));
                 internalSetNeedsDisplay(&flippedDirtyRect);
                 return;
             }
         }
 
-        internalSetNeedsDisplay(dirtyRect);
+        internalSetNeedsDisplay(&dirtyRect);
     }
     owner()->setNeedsCommit();
 }

Modified: trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.h (172680 => 172681)


--- trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.h	2014-08-16 02:57:58 UTC (rev 172680)
+++ trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.h	2014-08-16 04:03:42 UTC (rev 172681)
@@ -48,7 +48,8 @@
     ~PlatformCALayerWinInternal();
 
     void displayCallback(CACFLayerRef, CGContextRef);
-    void setNeedsDisplay(const FloatRect*);
+    void setNeedsDisplayInRect(const FloatRect&);
+    void setNeedsDisplay();
     PlatformCALayer* owner() const { return m_owner; }
 
     void setSublayers(const PlatformCALayerList&);

Modified: trunk/Source/WebKit2/ChangeLog (172680 => 172681)


--- trunk/Source/WebKit2/ChangeLog	2014-08-16 02:57:58 UTC (rev 172680)
+++ trunk/Source/WebKit2/ChangeLog	2014-08-16 04:03:42 UTC (rev 172681)
@@ -1,3 +1,29 @@
+2014-08-15  Zalan Bujtas  <za...@apple.com>
+
+        Do not use FloatRect::infiniteRect() to flag full repaints.
+        https://bugs.webkit.org/show_bug.cgi?id=135900
+
+        Reviewed by Simon Fraser.
+
+        Converting FloatRect::infiniteRect() to IntRect leads to value overflow
+        and we end up with invalid repaint rectangle. Use a boolean flag to indicate
+        full repaint request.
+
+        Covered by existing tests.
+
+        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
+        (WebKit::PlatformCALayerRemote::setNeedsDisplayInRect):
+        (WebKit::PlatformCALayerRemote::setNeedsDisplay):
+        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
+        * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
+        * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
+        (WebKit::PlatformCALayerRemoteCustom::setNeedsDisplayInRect):
+        (WebKit::PlatformCALayerRemoteCustom::setNeedsDisplay):
+        * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
+        (WebKit::PlatformCALayerRemoteTiledBacking::setNeedsDisplayInRect):
+        (WebKit::PlatformCALayerRemoteTiledBacking::setNeedsDisplay):
+        * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
+
 2014-08-15  Alexey Proskuryakov  <a...@apple.com>
 
         REGRESSION (r172660): WebKit2.TerminateTwice asserts

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp (172680 => 172681)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp	2014-08-16 02:57:58 UTC (rev 172680)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp	2014-08-16 04:03:42 UTC (rev 172681)
@@ -203,19 +203,21 @@
     m_properties.backingStore->ensureBackingStore(m_properties.bounds.size(), m_properties.contentsScale, m_acceleratesDrawing, m_properties.opaque);
 }
 
-void PlatformCALayerRemote::setNeedsDisplay(const FloatRect* rect)
+void PlatformCALayerRemote::setNeedsDisplayInRect(const FloatRect& rect)
 {
     ensureBackingStore();
 
-    if (!rect) {
-        m_properties.backingStore->setNeedsDisplay();
-        return;
-    }
-
     // FIXME: Need to map this through contentsRect/etc.
-    m_properties.backingStore->setNeedsDisplay(enclosingIntRect(*rect));
+    m_properties.backingStore->setNeedsDisplay(enclosingIntRect(rect));
 }
 
+void PlatformCALayerRemote::setNeedsDisplay()
+{
+    ensureBackingStore();
+
+    m_properties.backingStore->setNeedsDisplay();
+}
+
 void PlatformCALayerRemote::copyContentsFromLayer(PlatformCALayer* layer)
 {
     ASSERT(m_properties.clonedLayerID == layer->layerID());

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h (172680 => 172681)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h	2014-08-16 02:57:58 UTC (rev 172680)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h	2014-08-16 04:03:42 UTC (rev 172681)
@@ -51,7 +51,8 @@
 
     void recursiveBuildTransaction(RemoteLayerTreeContext&, RemoteLayerTreeTransaction&);
 
-    virtual void setNeedsDisplay(const WebCore::FloatRect* dirtyRect = 0) override;
+    virtual void setNeedsDisplayInRect(const WebCore::FloatRect& dirtyRect) override;
+    virtual void setNeedsDisplay() override;
 
     virtual void copyContentsFromLayer(PlatformCALayer*) override;
 

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h (172680 => 172681)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h	2014-08-16 02:57:58 UTC (rev 172680)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h	2014-08-16 04:03:42 UTC (rev 172681)
@@ -44,7 +44,8 @@
 
     virtual uint32_t hostingContextID() override;
 
-    virtual void setNeedsDisplay(const WebCore::FloatRect* dirtyRect = 0) override;
+    virtual void setNeedsDisplayInRect(const WebCore::FloatRect& dirtyRect) override;
+    virtual void setNeedsDisplay() override;
 
 private:
     PlatformCALayerRemoteCustom(WebCore::PlatformCALayer::LayerType, PlatformLayer *, WebCore::PlatformCALayerClient* owner, RemoteLayerTreeContext&);

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm (172680 => 172681)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm	2014-08-16 02:57:58 UTC (rev 172680)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm	2014-08-16 04:03:42 UTC (rev 172681)
@@ -131,15 +131,20 @@
     [m_platformLayer setContents:(id)contents];
 }
 
-void PlatformCALayerRemoteCustom::setNeedsDisplay(const FloatRect* rect)
+void PlatformCALayerRemoteCustom::setNeedsDisplayInRect(const FloatRect& rect)
 {
-    if (m_providesContents) {
-        if (rect)
-            [m_platformLayer setNeedsDisplayInRect:*rect];
-        else
-            [m_platformLayer setNeedsDisplay];
-    } else
-        PlatformCALayerRemote::setNeedsDisplay(rect);
+    if (m_providesContents)
+        [m_platformLayer setNeedsDisplayInRect:rect];
+    else
+        PlatformCALayerRemote::setNeedsDisplayInRect(rect);
 }
 
+void PlatformCALayerRemoteCustom::setNeedsDisplay()
+{
+    if (m_providesContents)
+        [m_platformLayer setNeedsDisplay];
+    else
+        PlatformCALayerRemote::setNeedsDisplay();
+}
+
 } // namespace WebKit

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp (172680 => 172681)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp	2014-08-16 02:57:58 UTC (rev 172680)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp	2014-08-16 04:03:42 UTC (rev 172681)
@@ -46,14 +46,16 @@
 {
 }
 
-void PlatformCALayerRemoteTiledBacking::setNeedsDisplay(const FloatRect* dirtyRect)
+void PlatformCALayerRemoteTiledBacking::setNeedsDisplayInRect(const FloatRect& dirtyRect)
 {
-    if (dirtyRect)
-        m_tileController->setNeedsDisplayInRect(enclosingIntRect(*dirtyRect));
-    else
-        m_tileController->setNeedsDisplay();
+    m_tileController->setNeedsDisplayInRect(enclosingIntRect(dirtyRect));
 }
 
+void PlatformCALayerRemoteTiledBacking::setNeedsDisplay()
+{
+    m_tileController->setNeedsDisplay();
+}
+
 const WebCore::PlatformCALayerList* PlatformCALayerRemoteTiledBacking::customSublayers() const
 {
     m_customSublayers = m_tileController->containerLayers();

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h (172680 => 172681)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h	2014-08-16 02:57:58 UTC (rev 172680)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h	2014-08-16 04:03:42 UTC (rev 172681)
@@ -40,7 +40,8 @@
 
     virtual WebCore::TiledBacking* tiledBacking() override { return m_tileController.get(); }
 
-    virtual void setNeedsDisplay(const WebCore::FloatRect* dirtyRect = 0) override;
+    virtual void setNeedsDisplayInRect(const WebCore::FloatRect& dirtyRect) override;
+    virtual void setNeedsDisplay() override;
 
     virtual const WebCore::PlatformCALayerList* customSublayers() const override;
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to