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 5ff5044..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,14 @@ 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());
@@ -87,6 +98,11 @@ void TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate()
     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);
@@ -125,3 +141,5 @@ void TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry()
 }
 
 } // namespace WebKit
+
+#endif // ENABLE(THREADED_SCROLLING)