Pass the right color space over to the web process so we can set it on our CA context
[WebKit-https.git] / Source / WebKit2 / UIProcess / mac / TiledCoreAnimationDrawingAreaProxy.mm
index 319bcb4..a0c1817 100644 (file)
@@ -26,6 +26,9 @@
 #import "config.h"
 #import "TiledCoreAnimationDrawingAreaProxy.h"
 
+#if ENABLE(THREADED_SCROLLING)
+
+#import "ColorSpaceData.h"
 #import "DrawingAreaMessages.h"
 #import "DrawingAreaProxyMessages.h"
 #import "LayerTreeContext.h"
@@ -56,6 +59,19 @@ void TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange()
     m_webPageProxy->process()->send(Messages::DrawingArea::SetDeviceScaleFactor(m_webPageProxy->deviceScaleFactor()), m_webPageProxy->pageID());
 }
 
+void TiledCoreAnimationDrawingAreaProxy::visibilityDidChange()
+{
+    if (!m_webPageProxy->isViewVisible())
+        m_webPageProxy->process()->send(Messages::DrawingArea::SuspendPainting(), m_webPageProxy->pageID());
+    else
+        m_webPageProxy->process()->send(Messages::DrawingArea::ResumePainting(), m_webPageProxy->pageID());
+}
+
+void TiledCoreAnimationDrawingAreaProxy::layerHostingModeDidChange()
+{
+    m_webPageProxy->process()->send(Messages::DrawingArea::SetLayerHostingMode(m_webPageProxy->layerHostingMode()), m_webPageProxy->pageID());
+}
+
 void TiledCoreAnimationDrawingAreaProxy::sizeDidChange()
 {
     if (!m_webPageProxy->isValid())
@@ -67,6 +83,12 @@ void TiledCoreAnimationDrawingAreaProxy::sizeDidChange()
         return;
 
     sendUpdateGeometry();
+}
+
+void TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate()
+{
+    if (!m_isWaitingForDidUpdateGeometry)
+        return;
 
     if (m_webPageProxy->process()->isLaunching())
         return;
@@ -76,6 +98,11 @@ void TiledCoreAnimationDrawingAreaProxy::sizeDidChange()
     m_webPageProxy->process()->connection()->waitForAndDispatchImmediately<Messages::DrawingAreaProxy::DidUpdateGeometry>(m_webPageProxy->pageID(), didUpdateBackingStoreStateTimeout);
 }
 
+void TiledCoreAnimationDrawingAreaProxy::colorSpaceDidChange()
+{
+    m_webPageProxy->process()->send(Messages::DrawingArea::SetColorSpace(m_webPageProxy->colorSpace()), m_webPageProxy->pageID());
+}
+
 void TiledCoreAnimationDrawingAreaProxy::enterAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext& layerTreeContext)
 {
     m_webPageProxy->enterAcceleratedCompositingMode(layerTreeContext);
@@ -87,6 +114,11 @@ void TiledCoreAnimationDrawingAreaProxy::exitAcceleratedCompositingMode(uint64_t
     ASSERT_NOT_REACHED();
 }
 
+void TiledCoreAnimationDrawingAreaProxy::updateAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext& layerTreeContext)
+{
+    m_webPageProxy->updateAcceleratedCompositingMode(layerTreeContext);
+}
+
 void TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry()
 {
     ASSERT(m_isWaitingForDidUpdateGeometry);
@@ -109,3 +141,5 @@ void TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry()
 }
 
 } // namespace WebKit
+
+#endif // ENABLE(THREADED_SCROLLING)