Get rid of LayerTreeContext::seed on Mac.
[WebKit-https.git] / Source / WebKit2 / UIProcess / DrawingAreaProxyImpl.cpp
index 9f85d3b..dae5c73 100644 (file)
@@ -163,19 +163,18 @@ void DrawingAreaProxyImpl::didSetSize(uint64_t sequenceNumber, const UpdateInfo&
 
 void DrawingAreaProxyImpl::enterAcceleratedCompositingMode(uint64_t sequenceNumber, const LayerTreeContext& layerTreeContext)
 {
-    ASSERT(!m_isInAcceleratedCompositingMode);
-    m_isInAcceleratedCompositingMode = true;
+    if (sequenceNumber < m_lastDidSetSizeSequenceNumber)
+        return;
 
-    m_backingStore = nullptr;
-    m_webPageProxy->enterAcceleratedCompositingMode(layerTreeContext);
+    enterAcceleratedCompositingMode(layerTreeContext);
 }
 
 void DrawingAreaProxyImpl::exitAcceleratedCompositingMode(uint64_t sequenceNumber)
 {
-    ASSERT(m_isInAcceleratedCompositingMode);
-    m_isInAcceleratedCompositingMode = false;
+    if (sequenceNumber < m_lastDidSetSizeSequenceNumber)
+        return;
 
-    m_webPageProxy->exitAcceleratedCompositingMode();
+    exitAcceleratedCompositingMode();
 }
 
 void DrawingAreaProxyImpl::incorporateUpdate(const UpdateInfo& updateInfo)
@@ -214,4 +213,21 @@ void DrawingAreaProxyImpl::sendSetSize()
     m_webPageProxy->process()->send(Messages::DrawingArea::SetSize(m_size), m_webPageProxy->pageID());
 }
 
+void DrawingAreaProxyImpl::enterAcceleratedCompositingMode(const LayerTreeContext& layerTreeContext)
+{
+    ASSERT(!m_isInAcceleratedCompositingMode);
+    m_isInAcceleratedCompositingMode = true;
+    
+    m_backingStore = nullptr;
+    m_webPageProxy->enterAcceleratedCompositingMode(layerTreeContext);
+}
+
+void DrawingAreaProxyImpl::exitAcceleratedCompositingMode()
+{
+    ASSERT(m_isInAcceleratedCompositingMode);
+    m_isInAcceleratedCompositingMode = false;
+    
+    m_webPageProxy->exitAcceleratedCompositingMode();
+}
+
 } // namespace WebKit