Add WTF::move()
[WebKit-https.git] / Source / WebCore / platform / graphics / texmap / coordinated / CoordinatedGraphicsLayer.cpp
index 732bff0..f64fef2 100644 (file)
@@ -51,8 +51,8 @@ static CoordinatedLayerID toCoordinatedLayerID(GraphicsLayer* layer)
 bool CoordinatedGraphicsLayer::notifyFlushRequired()
 {
     ASSERT(m_coordinator);
-    if (client() && !m_coordinator->isFlushingLayerChanges()) {
-        client()->notifyFlushRequired(this);
+    if (!m_coordinator->isFlushingLayerChanges()) {
+        client().notifyFlushRequired(this);
         return true;
     }
     return false;
@@ -105,7 +105,7 @@ void CoordinatedGraphicsLayer::didChangeGeometry()
     setShouldUpdateVisibleRect();
 }
 
-CoordinatedGraphicsLayer::CoordinatedGraphicsLayer(GraphicsLayerClient* client)
+CoordinatedGraphicsLayer::CoordinatedGraphicsLayer(GraphicsLayerClient& client)
     : GraphicsLayer(client)
 #ifndef NDEBUG
     , m_isPurging(false)
@@ -334,7 +334,7 @@ void CoordinatedGraphicsLayer::setOpacity(float opacity)
     didChangeLayerState();
 }
 
-void CoordinatedGraphicsLayer::setContentsRect(const IntRect& r)
+void CoordinatedGraphicsLayer::setContentsRect(const FloatRect& r)
 {
     if (contentsRect() == r)
         return;
@@ -346,7 +346,7 @@ void CoordinatedGraphicsLayer::setContentsRect(const IntRect& r)
     didChangeLayerState();
 }
 
-void CoordinatedGraphicsLayer::setContentsTileSize(const IntSize& s)
+void CoordinatedGraphicsLayer::setContentsTileSize(const FloatSize& s)
 {
     if (contentsTileSize() == s)
         return;
@@ -357,7 +357,7 @@ void CoordinatedGraphicsLayer::setContentsTileSize(const IntSize& s)
     didChangeLayerState();
 }
 
-void CoordinatedGraphicsLayer::setContentsTilePhase(const IntPoint& p)
+void CoordinatedGraphicsLayer::setContentsTilePhase(const FloatPoint& p)
 {
     if (contentsTilePhase() == p)
         return;
@@ -538,7 +538,7 @@ void CoordinatedGraphicsLayer::setNeedsDisplay()
     setNeedsDisplayInRect(FloatRect(FloatPoint(), size()));
 }
 
-void CoordinatedGraphicsLayer::setNeedsDisplayInRect(const FloatRect& rect)
+void CoordinatedGraphicsLayer::setNeedsDisplayInRect(const FloatRect& rect, ShouldClipToLayer)
 {
     if (m_mainBackingStore)
         m_mainBackingStore->invalidate(IntRect(rect));
@@ -822,7 +822,7 @@ void CoordinatedGraphicsLayer::resetLayerState()
 bool CoordinatedGraphicsLayer::imageBackingVisible()
 {
     ASSERT(m_coordinatedImageBacking);
-    return tiledBackingStoreVisibleRect().intersects(contentsRect());
+    return tiledBackingStoreVisibleRect().intersects(IntRect(contentsRect()));
 }
 
 void CoordinatedGraphicsLayer::releaseImageBackingIfNeeded()
@@ -885,7 +885,7 @@ void CoordinatedGraphicsLayer::adjustContentsScale()
     // we do not want to drop the previous one as that might result in
     // briefly seeing flickering as the old tiles may be dropped before
     // something replaces them.
-    m_previousBackingStore = std::move(m_mainBackingStore);
+    m_previousBackingStore = WTF::move(m_mainBackingStore);
 
     // No reason to save the previous backing store for non-visible areas.
     m_previousBackingStore->removeAllNonVisibleTiles();
@@ -893,7 +893,7 @@ void CoordinatedGraphicsLayer::adjustContentsScale()
 
 void CoordinatedGraphicsLayer::createBackingStore()
 {
-    m_mainBackingStore = std::make_unique<TiledBackingStore>(this, CoordinatedTileBackend::create(this));
+    m_mainBackingStore = std::make_unique<TiledBackingStore>(this, std::make_unique<CoordinatedTileBackend>(this));
     m_mainBackingStore->setSupportsAlpha(!contentsOpaque());
     m_mainBackingStore->setContentsScale(effectiveContentsScale());
 }
@@ -1133,7 +1133,7 @@ void CoordinatedGraphicsLayer::computeTransformedVisibleRect()
     m_shouldUpdateVisibleRect = false;
     TransformationMatrix currentTransform = transform();
     if (m_movingVisibleRect)
-        client()->getCurrentTransform(this, currentTransform);
+        client().getCurrentTransform(this, currentTransform);
     m_layerTransform.setLocalTransform(currentTransform);
 
     m_layerTransform.setAnchorPoint(m_adjustedAnchorPoint);
@@ -1180,7 +1180,7 @@ bool CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms()
     return toCoordinatedGraphicsLayer(parent())->selfOrAncestorHaveNonAffineTransforms();
 }
 
-bool CoordinatedGraphicsLayer::addAnimation(const KeyframeValueList& valueList, const IntSize& boxSize, const Animation* anim, const String& keyframesName, double delayAsNegativeTimeOffset)
+bool CoordinatedGraphicsLayer::addAnimation(const KeyframeValueList& valueList, const FloatSize& boxSize, const Animation* anim, const String& keyframesName, double delayAsNegativeTimeOffset)
 {
     ASSERT(!keyframesName.isEmpty());
 
@@ -1226,7 +1226,7 @@ void CoordinatedGraphicsLayer::resumeAnimations()
 
 void CoordinatedGraphicsLayer::animationStartedTimerFired(Timer<CoordinatedGraphicsLayer>*)
 {
-    client()->notifyAnimationStarted(this, m_lastAnimationStartTime);
+    client().notifyAnimationStarted(this, m_lastAnimationStartTime);
 }
 } // namespace WebCore
 #endif // USE(COORDINATED_GRAPHICS)