1. 28 Sep, 2013 1 commit
  2. 24 Apr, 2013 1 commit
  3. 15 Apr, 2013 1 commit
  4. 19 Mar, 2013 1 commit
    • zandobersek@gmail.com's avatar
      [GTK] Fix WebKit2 builds after r146193 · e3aba506
      zandobersek@gmail.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112700
      
      Reviewed by Martin Robinson.
      
      Apply changes to the LayerTreeHostGtk class that are analogous to changes made in r146193
      to the LayerTreeHostMac class, namely introducing a PageOverlayLayersMap and using that as
      the source of GraphicsLayer objects that should be operated on, making it possible to
      support multiple page overlays.
      
      * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
      (WebKit::LayerTreeHostGtk::initialize):
      (WebKit::LayerTreeHostGtk::invalidate):
      (WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplay):
      (WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplayInRect):
      (WebKit::LayerTreeHostGtk::sizeDidChange):
      (WebKit::LayerTreeHostGtk::didInstallPageOverlay):
      (WebKit::LayerTreeHostGtk::didUninstallPageOverlay):
      (WebKit::LayerTreeHostGtk::setPageOverlayNeedsDisplay):
      (WebKit::LayerTreeHostGtk::paintContents):
      (WebKit::LayerTreeHostGtk::flushPendingLayerChanges):
      (WebKit::LayerTreeHostGtk::createPageOverlayLayer):
      (WebKit::LayerTreeHostGtk::destroyPageOverlayLayer):
      * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
      (LayerTreeHostGtk):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146207 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e3aba506
  5. 20 Feb, 2013 1 commit
    • commit-queue@webkit.org's avatar
      [WK2] add setNeedsDisplay in DrawingArea to mark whole layer as dirty. · 7e8f973e
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=110299
      
      Patch by Huang Dongsung <luxtella@company100.net> on 2013-02-20
      Reviewed by Anders Carlsson.
      
      Currently, we call setNeedsDisplay with the size of WebPage to mark whole
      backing store as dirty. However, the size of non compositing layer can be
      inconsistent with the size of WebPage. For example, in Coordinated Graphics, the
      size of non compositing layer is contents size.
      
      So, WebPage should not assume the size of non compositing layer, and should just
      call setNeedsDisplay when marking whole layer as dirty.
      
      In addition, this patch renames from setNeedsDisplay() with a rect argument to
      setNeedsDisplayInRect(), which matches to the terms of GraphicsLayer.
      
      * WebProcess/WebCoreSupport/WebChromeClient.cpp:
      (WebKit::WebChromeClient::invalidateContentsAndRootView):
      (WebKit::WebChromeClient::invalidateContentsForSlowScroll):
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::restoreViewState):
      * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
      (WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplay):
      (WebKit):
      (WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplayInRect):
      (WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents):
      * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
      (CoordinatedLayerTreeHost):
      * WebProcess/WebPage/DrawingArea.h:
      (DrawingArea):
      * WebProcess/WebPage/DrawingAreaImpl.cpp:
      (WebKit::DrawingAreaImpl::setNeedsDisplay):
      (WebKit):
      (WebKit::DrawingAreaImpl::setNeedsDisplayInRect):
      (WebKit::DrawingAreaImpl::scroll):
      (WebKit::DrawingAreaImpl::forceRepaint):
      (WebKit::DrawingAreaImpl::didUninstallPageOverlay):
      (WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay):
      (WebKit::DrawingAreaImpl::resumePainting):
      * WebProcess/WebPage/DrawingAreaImpl.h:
      (DrawingAreaImpl):
      * WebProcess/WebPage/LayerTreeHost.h:
      (LayerTreeHost):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::setSize):
      (WebKit::WebPage::setDrawsBackground):
      (WebKit::WebPage::setDrawsTransparentBackground):
      (WebKit::WebPage::resumeActiveDOMObjectsAndAnimations):
      * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
      (WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplay):
      (WebKit):
      (WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplayInRect):
      (WebKit::LayerTreeHostGtk::scrollNonCompositedContents):
      * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
      (LayerTreeHostGtk):
      * WebProcess/WebPage/mac/LayerTreeHostMac.h:
      (LayerTreeHostMac):
      * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
      (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay):
      (WebKit):
      (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplayInRect):
      (WebKit::LayerTreeHostMac::scrollNonCompositedContents):
      * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
      (RemoteLayerTreeDrawingArea):
      * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
      (WebKit::RemoteLayerTreeDrawingArea::setNeedsDisplay):
      (WebKit):
      (WebKit::RemoteLayerTreeDrawingArea::setNeedsDisplayInRect):
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
      (TiledCoreAnimationDrawingArea):
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
      (WebKit::TiledCoreAnimationDrawingArea::setNeedsDisplay):
      (WebKit):
      (WebKit::TiledCoreAnimationDrawingArea::setNeedsDisplayInRect):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7e8f973e
  6. 15 Feb, 2013 1 commit
    • commit-queue@webkit.org's avatar
      [WK2] Rename from scrollOffset to scrollDelta in WebChromeClient. · c5766db4
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=109885
      
      Patch by Huang Dongsung <luxtella@company100.net> on 2013-02-14
      Reviewed by Simon Fraser.
      
      Chrome sends a scroll delta to WebChromeClient but WebChromeClient names it
      scrollOffset. So this patch corrects this misnaming.
      
      In addition, all subclasses of LayerTreeHost don't use the misnamed
      scrollOffset in scrollNonCompositedContents(), so this patch removes the
      scrollOffset argument.
      
      * WebProcess/WebCoreSupport/WebChromeClient.cpp:
      (WebKit::WebChromeClient::scroll):
      * WebProcess/WebCoreSupport/WebChromeClient.h:
      (WebChromeClient):
      * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
      (WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents):
      * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
      (CoordinatedLayerTreeHost):
      * WebProcess/WebPage/DrawingArea.h:
      (DrawingArea):
      * WebProcess/WebPage/DrawingAreaImpl.cpp:
      (WebKit::DrawingAreaImpl::scroll):
      * WebProcess/WebPage/DrawingAreaImpl.h:
      (DrawingAreaImpl):
      * WebProcess/WebPage/LayerTreeHost.h:
      (LayerTreeHost):
      * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
      (WebKit::LayerTreeHostGtk::scrollNonCompositedContents):
      * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
      (LayerTreeHostGtk):
      * WebProcess/WebPage/mac/LayerTreeHostMac.h:
      (LayerTreeHostMac):
      * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
      (WebKit::LayerTreeHostMac::scrollNonCompositedContents):
      * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
      (RemoteLayerTreeDrawingArea):
      * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
      (WebKit::RemoteLayerTreeDrawingArea::scroll):
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
      (TiledCoreAnimationDrawingArea):
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
      (WebKit::TiledCoreAnimationDrawingArea::scroll):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142968 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c5766db4
  7. 29 Jan, 2013 1 commit
    • commit-queue@webkit.org's avatar
      [WK2] Call LayerTreeHost::deviceOrPageScaleFactorChanged() when a device or... · 91d65e9f
      commit-queue@webkit.org authored
      [WK2] Call LayerTreeHost::deviceOrPageScaleFactorChanged() when a device or page scale factor is changed.
      https://bugs.webkit.org/show_bug.cgi?id=107802
      
      Patch by Huang Dongsung <luxtella@company100.net> on 2013-01-29
      Reviewed by Simon Fraser.
      
      Currently, LayerTreeHostMac and *GTK call deviceOrPageScaleFactorChanged()
      of the non compositing GraphicsLayer when a device scale factor is changed.
      
      There are two problems.
      1. We don't notify LayerTreeHost when a page scale factor is changed.
      2. When using TiledCoreAnimationDrawingAreaProxy, LayerTreeHostMac does
      not receive the device scale factor changed callback.
      
      So this patch changes three points.
      1. Rename from deviceScaleFactorDidChange() to deviceOrPageScaleFactorChanged()
      in LayerTreeHost.
      2. WebPage::setDeviceScaleFactor() calls LayerTreeHost::deviceScaleFactorDidChange()
      because of dealing with TiledCoreAnimationDrawingAreaProxy.
      3. WebPage::pageScaleFactor() calls LayerTreeHost::deviceScaleFactorDidChange()
      to call deviceOrPageScaleFactorChanged() of the non compositing GraphicsLayer.
      
      Unfortunately, I couldn't think of a way to test this in an automated fashion.
      
      * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
      (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
      * WebProcess/WebPage/DrawingAreaImpl.cpp:
      (WebKit::DrawingAreaImpl::updateBackingStoreState):
          Don't call LayerTreeHost::deviceScaleFactorDidChange() because this
          method calls WebPage::setDeviceScaleFactor() and then
          LayerTreeHost::deviceScaleFactorDidChange() is called.
      * WebProcess/WebPage/LayerTreeHost.h:
      (LayerTreeHost):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::scalePage):
      (WebKit::WebPage::setDeviceScaleFactor):
      * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
      (WebKit::LayerTreeHostGtk::deviceOrPageScaleFactorChanged):
      * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
      (LayerTreeHostGtk):
      * WebProcess/WebPage/mac/LayerTreeHostMac.h:
      (LayerTreeHostMac):
      * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
      (WebKit::LayerTreeHostMac::deviceOrPageScaleFactorChanged):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      91d65e9f
  8. 05 Nov, 2012 1 commit
    • simon.fraser@apple.com's avatar
      Fix layer borders to cleaning appear and disappear on switching · e2605d52
      simon.fraser@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=101136
      
      Source/WebCore:
      
      Reviewed by Sam Weinig.
      
      GraphicsLayers decided whether to show layer borders based
      on a callback through the GraphicsLayerClient. This made it
      hard to manage state, resulting in a failure to cleanly
      hide layers when toggled off via the preference.
      
      Changed the layer border and repaint counter visibility to be bits
      stored on GraphicsLayer just like other properties, with getters
      and setters. RenderLayerBacking now updates these debug
      indicators when we update other compositing layer properties.
      
      In GraphicsLayerCA, avoid calling updateDebugIndicators() explicitly
      in several places by setting the change flag DebugIndicatorsChanged
      for properties whose values affect the appearance of the debug border.
      
      Removed the GraphicsLayerClient methods showDebugBorders() and
      showRepaintCounter() which are no longer required.
      
      * platform/graphics/GraphicsLayer.cpp:
      (WebCore::GraphicsLayer::GraphicsLayer):
      (WebCore::GraphicsLayer::updateDebugIndicators):
      * platform/graphics/GraphicsLayer.h:
      (WebCore::GraphicsLayer::setShowDebugBorder):
      (WebCore::GraphicsLayer::isShowingDebugBorder):
      (WebCore::GraphicsLayer::setShowRepaintCounter):
      (WebCore::GraphicsLayer::isShowingRepaintCounter):
      (WebCore::GraphicsLayer::repaintCount):
      (WebCore::GraphicsLayer::incrementRepaintCount):
      * platform/graphics/GraphicsLayerClient.h:
      * platform/graphics/ca/GraphicsLayerCA.cpp:
      (WebCore::GraphicsLayerCA::GraphicsLayerCA):
      (WebCore::GraphicsLayerCA::setMasksToBounds):
      (WebCore::GraphicsLayerCA::setDrawsContent):
      (WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter):
      (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
      (WebCore::GraphicsLayerCA::updateMasksToBounds):
      (WebCore::GraphicsLayerCA::updateLayerDrawsContent):
      (WebCore::GraphicsLayerCA::updateDebugBorder):
      (WebCore::GraphicsLayerCA::setShowDebugBorder):
      (WebCore::GraphicsLayerCA::setShowRepaintCounter):
      (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
      (WebCore::GraphicsLayerCA::setupContentsLayer):
      (WebCore::GraphicsLayerCA::cloneLayer):
      * platform/graphics/ca/GraphicsLayerCA.h:
      (GraphicsLayerCA):
      (WebCore::GraphicsLayerCA::platformCALayerShowDebugBorders):
      * rendering/RenderLayerBacking.cpp:
      (WebCore::RenderLayerBacking::updateDebugIndicators):
      * rendering/RenderLayerBacking.h:
      (RenderLayerBacking):
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::updateBacking):
      * rendering/RenderLayerCompositor.h:
      (RenderLayerCompositor):
      
      Source/WebKit/blackberry:
      
      Reviewed by Sam Weinig.
      
      Remove the GraphicsLayerClient methods showDebugBorders() and
      showRepaintCounter().
      
      * Api/WebOverlay_p.h:
      (WebOverlayPrivateWebKitThread):
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPagePrivate::notifyFlushRequired):
      * Api/WebPage_p.h:
      * WebKitSupport/DefaultTapHighlight.cpp:
      * WebKitSupport/DefaultTapHighlight.h:
      (DefaultTapHighlight):
      * WebKitSupport/InspectorOverlayBlackBerry.cpp:
      * WebKitSupport/InspectorOverlayBlackBerry.h:
      (InspectorOverlay):
      * WebKitSupport/SelectionOverlay.cpp:
      * WebKitSupport/SelectionOverlay.h:
      (SelectionOverlay):
      
      Source/WebKit/chromium:
      
      Reviewed by Sam Weinig.
      
      Remove the GraphicsLayerClient methods showDebugBorders() and
      showRepaintCounter().
      
      * src/NonCompositedContentHost.cpp:
      * src/NonCompositedContentHost.h:
      (NonCompositedContentHost):
      * src/PageOverlay.cpp:
      * tests/GraphicsLayerChromiumTest.cpp:
      * tests/ImageLayerChromiumTest.cpp:
      
      Source/WebKit/gtk:
      
      Reviewed by Sam Weinig.
      
      Remove the GraphicsLayerClient methods showDebugBorders() and
      showRepaintCounter().
      
      * WebCoreSupport/AcceleratedCompositingContext.h:
      (AcceleratedCompositingContext):
      * WebCoreSupport/AcceleratedCompositingContextCairo.cpp:
      * WebCoreSupport/AcceleratedCompositingContextClutter.cpp:
      * WebCoreSupport/AcceleratedCompositingContextGL.cpp:
      
      Source/WebKit/win:
      
      Reviewed by Sam Weinig.
      
      Remove the GraphicsLayerClient methods showDebugBorders() and
      showRepaintCounter().
      
      * WebView.cpp:
      * WebView.h:
      
      Source/WebKit2:
      
      Reviewed by Sam Weinig.
      
      Remove the GraphicsLayerClient methods showDebugBorders() and
      showRepaintCounter().
      
      * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
      * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
      * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
      (LayerTreeCoordinator):
      * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
      * WebProcess/WebPage/ca/LayerTreeHostCA.h:
      (LayerTreeHostCA):
      * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
      * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
      (LayerTreeHostGtk):
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
      (TiledCoreAnimationDrawingArea):
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133517 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e2605d52
  9. 04 Oct, 2012 1 commit
    • simon.fraser@apple.com's avatar
      Final part of "sync" to "flush" renaming · df44c011
      simon.fraser@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=98430
      
      Reviewed by Tim Horton.
      
      Change method names on GraphicsLayer and GraphicsLayerClient that
      refer to "sync" to use the term "flush" instead, to be consistent
      with the rest of the code.
      
      Source/WebCore:
      
      * platform/graphics/GraphicsLayer.h:
      (WebCore::GraphicsLayer::flushCompositingState):
      (WebCore::GraphicsLayer::flushCompositingStateForThisLayerOnly):
      * platform/graphics/GraphicsLayerClient.h:
      (GraphicsLayerClient):
      * platform/graphics/blackberry/GraphicsLayerBlackBerry.h:
      (WebCore::GraphicsLayerBlackBerry::notifyFlushRequired):
      * platform/graphics/blackberry/LayerWebKitThread.cpp:
      (WebCore::LayerWebKitThread::setNeedsCommit):
      * platform/graphics/ca/GraphicsLayerCA.cpp:
      (WebCore::GraphicsLayerCA::flushCompositingState):
      (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly):
      (WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
      (WebCore::GraphicsLayerCA::positionForCloneRootLayer):
      (WebCore::GraphicsLayerCA::noteLayerPropertyChanged):
      * platform/graphics/ca/GraphicsLayerCA.h:
      (GraphicsLayerCA):
      * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
      (WebCore::GraphicsLayerTextureMapper::notifyChange):
      (WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
      (WebCore::GraphicsLayerTextureMapper::flushCompositingState):
      * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
      (GraphicsLayerTextureMapper):
      * platform/graphics/texmap/TextureMapperLayer.cpp:
      (WebCore::TextureMapperLayer::flushCompositingState):
      (WebCore::TextureMapperLayer::flushCompositingStateSelf):
      * platform/graphics/texmap/TextureMapperLayer.h:
      (TextureMapperLayer):
      * rendering/RenderLayerBacking.cpp:
      (WebCore::RenderLayerBacking::notifyFlushRequired):
      * rendering/RenderLayerBacking.h:
      (RenderLayerBacking):
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
      * rendering/RenderLayerCompositor.h:
      (WebCore::RenderLayerCompositor::notifyFlushRequired):
      
      Source/WebKit/blackberry:
      
      * Api/WebOverlay.cpp:
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::notifyFlushRequired):
      * Api/WebOverlay_p.h:
      (WebOverlayPrivateWebKitThread):
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPagePrivate::notifyFlushRequired):
      * Api/WebPage_p.h:
      (WebPagePrivate):
      * WebKitSupport/DefaultTapHighlight.cpp:
      (BlackBerry::WebKit::DefaultTapHighlight::notifyFlushRequired):
      * WebKitSupport/DefaultTapHighlight.h:
      (DefaultTapHighlight):
      * WebKitSupport/InspectorOverlayBlackBerry.cpp:
      (BlackBerry::WebKit::InspectorOverlay::notifyFlushRequired):
      * WebKitSupport/InspectorOverlayBlackBerry.h:
      (InspectorOverlay):
      * WebKitSupport/SelectionOverlay.cpp:
      (BlackBerry::WebKit::SelectionOverlay::notifyFlushRequired):
      * WebKitSupport/SelectionOverlay.h:
      (SelectionOverlay):
      
      Source/WebKit/efl:
      
      * WebCoreSupport/AcceleratedCompositingContextEfl.cpp:
      (WebCore::AcceleratedCompositingContext::syncLayersNow):
      (WebCore::AcceleratedCompositingContext::attachRootGraphicsLayer):
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/AcceleratedCompositingContext.h:
      (AcceleratedCompositingContext):
      * WebCoreSupport/AcceleratedCompositingContextCairo.cpp:
      (WebKit::AcceleratedCompositingContext::attachRootGraphicsLayer):
      (WebKit::AcceleratedCompositingContext::resizeRootLayer):
      (WebKit::AcceleratedCompositingContext::syncLayersNow):
      (WebKit::AcceleratedCompositingContext::notifyFlushRequired):
      * WebCoreSupport/AcceleratedCompositingContextClutter.cpp:
      (WebKit::AcceleratedCompositingContext::flushPendingLayerChanges):
      (WebKit::AcceleratedCompositingContext::notifyFlushRequired):
      * WebCoreSupport/AcceleratedCompositingContextGL.cpp:
      (WebKit::AcceleratedCompositingContext::flushPendingLayerChanges):
      (WebKit::AcceleratedCompositingContext::notifyFlushRequired):
      
      Source/WebKit/mac:
      
      * WebView/WebView.mm:
      
      Source/WebKit/qt:
      
      * WebCoreSupport/PageClientQt.cpp:
      (WebCore::TextureMapperLayerClientQt::syncRootLayer):
      
      Source/WebKit/win:
      
      * WebView.cpp:
      (WebView::notifyFlushRequired):
      (WebView::flushPendingGraphicsLayerChanges):
      * WebView.h:
      
      Source/WebKit2:
      
      * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
      (WebKit::LayerTreeRenderer::paintToCurrentGLContext):
      (WebKit::LayerTreeRenderer::flushLayerChanges):
      * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
      (WebKit::LayerTreeRenderer::notifyFlushRequired):
      * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
      (WebCore::CoordinatedGraphicsLayer::didChangeLayerState):
      (WebCore::CoordinatedGraphicsLayer::didChangeAnimatedProperties):
      (WebCore::CoordinatedGraphicsLayer::didChangeChildren):
      (WebCore::CoordinatedGraphicsLayer::didChangeFilters):
      (WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay):
      (WebCore::CoordinatedGraphicsLayer::setContentsToCanvas):
      (WebCore::CoordinatedGraphicsLayer::flushCompositingState):
      (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
      * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
      (CoordinatedGraphicsLayer):
      * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
      (WebKit::LayerTreeCoordinator::flushPendingLayerChanges):
      (WebKit::LayerTreeCoordinator::notifyFlushRequired):
      * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
      (LayerTreeCoordinator):
      * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
      (WebKit::LayerTreeHostCA::notifyFlushRequired):
      (WebKit::LayerTreeHostCA::flushPendingLayerChanges):
      * WebProcess/WebPage/ca/LayerTreeHostCA.h:
      (LayerTreeHostCA):
      * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
      (WebKit::LayerTreeHostGtk::notifyFlushRequired):
      (WebKit::LayerTreeHostGtk::flushPendingLayerChanges):
      * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
      (LayerTreeHostGtk):
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
      (TiledCoreAnimationDrawingArea):
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
      (WebKit::TiledCoreAnimationDrawingArea::notifyFlushRequired):
      (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130439 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      df44c011
  10. 18 Sep, 2012 1 commit
    • mrobinson@webkit.org's avatar
      [GTK] [WebKit2] Use XComposite window for accelerated compositing · bc929f61
      mrobinson@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=94417
      
      Reviewed by Carlos Garcia Campos.
      
      Instead of rendering directly to the widget's native window, render to an
      offscreen window redirected to a Pixmap with XComposite.
      
      Source/WebCore:
      
      No new tests. This will be covered by the existing accelerated compositing tests,
      which should now give correct pixel results.
      
      * platform/gtk/RedirectedXCompositeWindow.cpp:
      (WebCore::RedirectedXCompositeWindow::resize): Add a call to XFlush which ensures
      that pending X11 operations complete.
      * platform/gtk/RedirectedXCompositeWindow.h:
      (WebCore::RedirectedXCompositeWindow::windowId): Added this accessor.
      
      Source/WebKit2:
      
      * UIProcess/API/gtk/WebKitWebViewBase.cpp:
      (_WebKitWebViewBasePrivate): Added a few members necessary to track the
      offscreen window.
      (webkit_web_view_base_init):
      (renderAcceleratedCompositingResults): Added this helper functions which renders
      the results of the accelerated compositing operations during the GTK+ draw loop.
      (webkitWebViewBaseDraw): Call renderAcceleratedCompositingResults when appropriate.
      (resizeWebKitWebViewBaseFromAllocation): Resize the offscreen window when appropriate.
      (webkitWebViewBaseSizeAllocate): Do not call resizeWebKitWebViewBaseFromAllocation when
      the actual size of the widget does not change. This prevents destroying and recreating
      the offscreen window pixmap when it isn't necessary.
      (webkitWebViewBaseMap): We no longer send the window id during map, instead it's sent
      as soon as there is WebPageProxy.
      (webkitWebViewBaseCreateWebPage): Send the window id of the redirected window to
      the WebProcess.
      (queueAnotherDrawOfAcceleratedCompositingResults): Added this helper which works
      around the issue of slow updates of the pixmap backing the redirected XComposite window.
      (webkitWebViewBaseQueueDrawOfAcceleratedCompositingResults): Added this method which
      is what the WebProcess uses to force a redraw on the UIProcess side.
      * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Added new method to the list of private methods.
      * UIProcess/DrawingAreaProxyImpl.h:
      (DrawingAreaProxyImpl):
      (WebKit::DrawingAreaProxyImpl::isInAcceleratedCompositingMode): Exposed this method publically
      so that it can be used from WebKitWebViewBase.
      * UIProcess/WebPageProxy.h:
      (WebPageProxy): Renamed widgetMapped to setAcceleratedCompositingWindowId.
      * UIProcess/WebPageProxy.messages.in: Ditto.
      * UIProcess/gtk/WebPageProxyGtk.cpp: Ditto.
      (WebKit::WebPageProxy::setAcceleratedCompositingWindowId):
      * WebProcess/WebPage/WebPage.h:
      (WebPage): Ditto.
      * WebProcess/WebPage/WebPage.messages.in: Ditto.
      * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
      (WebKit::LayerTreeHostGtk::sizeDidChange): Force a composite to the resized window right
      away so that the new window pixmap is updated before the first draw.
      (WebKit::LayerTreeHostGtk::compositeLayersToContext): If the composition is for a resize,
      first clear the entire GL context so that we don't see black artifacts during resize.
      * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
      (LayerTreeHostGtk): Update the signature of  compositeLayersToContext.
      * WebProcess/WebPage/gtk/WebPageGtk.cpp:
      (WebKit::WebPage::setAcceleratedCompositingWindowId): Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bc929f61
  11. 28 Jun, 2012 1 commit
  12. 25 Jun, 2012 1 commit
  13. 13 Jun, 2012 1 commit
    • mrobinson@webkit.org's avatar
      [GTK] Add an accelerated compositing implementation for WebKit2 · b847741b
      mrobinson@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=86037
      
      Reviewed by Alejandro G. Castro.
      
      Source/WebCore:
      
      No new tests. These changes are covered by the compositing tests, which
      we will gradually try to turn on for the bots.
      
      Add a new GLContext method for getting to current default framebuffer size, which
      is quite useful for preventing composited content quivering while resizing.
      
      * platform/graphics/cairo/GLContext.h:
      * platform/graphics/glx/GLContextGLX.cpp:
      (WebCore::GLContextGLX::defaultFrameBufferSize): Added this implementation for X11
      which asks the X server for the window size.
      * platform/graphics/glx/GLContextGLX.h:
      
      Source/WebKit2:
      
      Add an implementation of LayerTreeHost for GTK+ that uses TextureMapperGL.
      Later this implementation will fall back to using the ImageBuffer TextureMapper.
      
      * GNUmakefile.am: Add new files to the compilation.
      * Shared/LayerTreeContext.h:
      (LayerTreeContext): The GTK+ version of the LayerTreeContext just holds window handle.
      * Shared/gtk/LayerTreeContextGtk.cpp: Copied from Source/WebKit2/WebProcess/WebPage/LayerTreeHost.cpp.
      * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: Added.
      * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: Added.
      Add this LayerTreeHost implementation that just creates a GL context from the widget X11 window ID.
      Later implementations might find a more cross-platform solution.
      * WebProcess/WebPage/gtk/WebPageGtk.cpp:
      (WebKit::WebPage::platformInitialize): Initialize the native window handle to be zero.
      (WebKit::WebPage::widgetMapped): When mapping the widget, try to get the native window
      handle and send it to the WebProcess.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120262 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b847741b
  14. 08 May, 2012 1 commit
    • andersca@apple.com's avatar
      DrawingAreaProxyImpl doesn't work with window server hosting · 920deaf2
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=85947
      <rdar://problem/11213718>
      
      Reviewed by Andreas Kling.
      
      * UIProcess/DrawingAreaProxyImpl.cpp:
      (WebKit::DrawingAreaProxyImpl::updateAcceleratedCompositingMode):
      Update the layer tree context and call WebPage::updateAcceleratedCompositingMode.
      
      * WebProcess/WebPage/DrawingAreaImpl.cpp:
      (WebKit::DrawingAreaImpl::setLayerHostingMode):
      If setting the layer hosting mode changed the layer tree context, send back an UpdateAcceleratedCompositingMode message
      with the new context.
      
      * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
      (WebKit::LayerTreeHostCA::initialize):
      platformInitialize no longer takes a context.
      
      * WebProcess/WebPage/ca/LayerTreeHostCA.h:
      (LayerTreeHostCA):
      Make m_layerTreeContext protected instead.
      
      * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
      * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
      (WebKit::LayerTreeHostCAMac::platformInitialize):
      Assign to m_layerTreeContext directly.
      
      (WebKit::LayerTreeHostCAMac::setLayerHostingMode):
      Set m_layerTreeContext.contextID.
      
      * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
      (WebKit::LayerTreeHostCAWin::platformInitialize):
      Assign to m_layerTreeContext directly.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      920deaf2
  15. 26 Jan, 2012 1 commit
    • timothy_horton@apple.com's avatar
      3D transformed elements hide when showing the print dialog · 731a8c69
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=45894
      <rdar://problem/7441593>
      
      Reviewed by Andy Estes.
      
      Suspend updates of the compositing layer tree while printing is taking place,
      preventing on-screen layers from moving to their print-mode positions.
      
      No new tests, as WebKitTestRunner doesn't support putting the document
      into printing mode.
      
      * page/FrameView.cpp:
      (WebCore::FrameView::syncCompositingStateForThisFrame):
      (WebCore::FrameView::paintContents):
      * platform/graphics/ca/LayerFlushScheduler.h:
      (WebCore::LayerFlushScheduler::isSuspended): Added.
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::beginPrinting):
      (WebKit::WebPage::endPrinting):
      * WebProcess/WebPage/ca/LayerTreeHostCA.h:
      * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
      * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
      (WebKit::LayerTreeHostCAMac::forceRepaint):
      (WebKit::LayerTreeHostCAMac::flushPendingLayerChanges):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106083 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      731a8c69
  16. 24 Jan, 2012 1 commit
    • simon.fraser@apple.com's avatar
      Show layer borders for scrollbar layers · cc7fbbce
      simon.fraser@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=76888
      
      Source/WebCore:
      
      Reviewed by Beth Dakin.
      
      When compositing layer borders are showing, show the borders
      for scrollbars layers. This reduces confusion about whether scrollbars
      are rendering into their own layers.
      
      Requires a new parameter to two GraphicsLayerClient methods.
      
      * platform/graphics/GraphicsLayer.h:
      (WebCore::GraphicsLayer::showDebugBorders):
      (WebCore::GraphicsLayer::showRepaintCounter):
      * platform/graphics/GraphicsLayerClient.h:
      * rendering/RenderLayerBacking.cpp:
      (WebCore::RenderLayerBacking::showDebugBorders):
      (WebCore::RenderLayerBacking::showRepaintCounter):
      * rendering/RenderLayerBacking.h:
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::showDebugBorders):
      (WebCore::RenderLayerCompositor::showRepaintCounter):
      * rendering/RenderLayerCompositor.h:
      
      Source/WebKit/chromium:
      
      Reviewed by Beth Dakin.
      
      Update for new signature of GraphicsLayerClient::showDebugBorders()
      and GraphicsLayerClient::showRepaintCounter().
      
      * src/NonCompositedContentHost.cpp:
      (WebKit::NonCompositedContentHost::showDebugBorders):
      (WebKit::NonCompositedContentHost::showRepaintCounter):
      * src/NonCompositedContentHost.h:
      * src/PageOverlay.cpp:
      (WebKit::OverlayGraphicsLayerClientImpl::showDebugBorders):
      (WebKit::OverlayGraphicsLayerClientImpl::showRepaintCounter):
      * tests/ImageLayerChromiumTest.cpp:
      (WebCore::MockGraphicsLayerClient::showDebugBorders):
      (WebCore::MockGraphicsLayerClient::showRepaintCounter):
      
      Source/WebKit/win:
      
      Reviewed by Beth Dakin.
      
      Update for new signature of GraphicsLayerClient::showDebugBorders()
      and GraphicsLayerClient::showRepaintCounter().
      
      * WebView.cpp:
      (WebView::showDebugBorders):
      (WebView::showRepaintCounter):
      * WebView.h:
      
      Source/WebKit2:
      
      Reviewed by Beth Dakin.
      
      Update for new signatures of GraphicsLayerClient::showDebugBorders()
      and GraphicsLayerClient::showRepaintCounter().
      
      * UIProcess/LayerTreeHostProxy.h:
      (WebKit::LayerTreeHostProxy::showDebugBorders):
      (WebKit::LayerTreeHostProxy::showRepaintCounter):
      * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
      (WebKit::LayerTreeHostCA::showDebugBorders):
      (WebKit::LayerTreeHostCA::showRepaintCounter):
      * WebProcess/WebPage/ca/LayerTreeHostCA.h:
      * WebProcess/WebPage/qt/LayerTreeHostQt.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cc7fbbce
  17. 15 Aug, 2011 2 commits
    • aroben@apple.com's avatar
      Update pages' style and content scale when the window's backing scale factor changes · ee6f6180
      aroben@apple.com authored
      Unfortunately, I couldn't think of a way to test this in an automated fashion.
      
      Fixes <http://webkit.org/b/66229> <rdar://problem/9906269> WebKit doesn't react to device
      scale factor changes
      
      Reviewed by Simon Fraser.
      
      Source/WebCore:
      
      * WebCore.exp.in: Export Frame::deviceOrScaleFactorChanged.
      
      * page/Frame.cpp:
      (WebCore::Frame::deviceScaleFactorChanged):
      * page/Frame.h:
      Added this new function. We recalc style so that, e.g., device-scale-factor-dependent media
      queries will be reevaluated, and we tell compositing layers about the new scale factor so
      they can rerender at the new resolution.
      
      Source/WebKit/mac:
      
      * WebView/WebView.mm:
      (-[WebView addWindowObserversForWindow:]):
      (-[WebView removeWindowObservers]):
      Listen for the notification that tells us the window's backing scale has changed.
      
      (-[WebView _windowDidChangeResolution:]): Tell the page about the change to the device scale
      factor so that, e.g., scale-factor-dependent media queries will be reevaluated.
      
      Source/WebKit2:
      
      * UIProcess/API/mac/WKView.mm:
      (-[WKView addWindowObserversForWindow:]):
      (-[WKView removeWindowObservers]):
      Listen for the notification that tells us the window's backing scale has changed.
      
      (-[WKView _windowDidChangeResolution:]): Tell the WebPageProxy about the change.
      
      * UIProcess/DrawingAreaProxy.h:
      * UIProcess/DrawingAreaProxyImpl.h:
      Added deviceScaleFactorDidChange.
      
      * UIProcess/DrawingAreaProxyImpl.cpp:
      (WebKit::DrawingAreaProxyImpl::deviceScaleFactorDidChange): Request a new backing store
      since the current one is using an old device scale factor.
      (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState): Send the device scale factor
      along to the web process so it can render accordingly. This is how we tell the web process
      about device scale factor changes.
      
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::viewStateDidChange): Tell the DrawingAreaProxy when the device scale
      factor changes.
      (WebKit::WebPageProxy::deviceScaleFactor): Added this simple getter that calls through to
      the PageClient. DrawingAreaProxy uses this function.
      
      * UIProcess/WebPageProxy.h: Added new members.
      
      * WebProcess/WebPage/DrawingArea.h:
      (WebKit::DrawingArea::updateBackingStoreState):
      * WebProcess/WebPage/DrawingArea.messages.in:
      * WebProcess/WebPage/DrawingAreaImpl.h:
      Send the device scale factor in the UpdateBackingStoreState message.
      
      * WebProcess/WebPage/DrawingAreaImpl.cpp:
      (WebKit::DrawingAreaImpl::updateBackingStoreState): Tell the WebPage and LayerTreeHost about
      the new device scale factor.
      
      * WebProcess/WebPage/LayerTreeHost.h:
      * WebProcess/WebPage/ca/LayerTreeHostCA.h:
      Added deviceScaleFactorDidChange.
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::setDeviceScaleFactor): Store the new scale factor and tell the page about
      it so that, e.g., scale-factor-dependent media queries will be reevaluated.
      
      * WebProcess/WebPage/WebPage.h: Added setDeviceScaleFactor.
      
      * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
      (WebKit::LayerTreeHostCA::deviceScaleFactorDidChange): Tell the layer for non-composited
      content about the new scale factor.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@93058 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ee6f6180
    • aroben@apple.com's avatar
      Clear up scale factor terminology · 631cb90e
      aroben@apple.com authored
      WebKit by and large deals with two scale factors: one intrinsic to the device on which the
      software is running, and one that is per-Page and can be controlled via API calls. This
      patch names the former "deviceScaleFactor" and the latter "pageScaleFactor", and makes the
      code use those names. It should introduce no behavior changes.
      
      Fixes <http://webkit.org/b/55787> WebKit uses multiple conflicting names to refer to the
      device scale factor
      
      Reviewed by Simon Fraser.
      
      Source/WebCore:
      
      * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
      * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
      Removed an unused member. This is unrelated to this patch.
      
      * css/MediaQueryEvaluator.cpp:
      * html/HTMLCanvasElement.cpp:
      * html/HTMLCanvasElement.h:
      * loader/EmptyClients.h:
      * page/Chrome.cpp:
      * page/Chrome.h:
      * page/ChromeClient.h:
      * page/DOMWindow.cpp:
      * page/Frame.cpp:
      * page/Frame.h:
      * platform/graphics/GraphicsLayer.cpp:
      * platform/graphics/GraphicsLayer.h:
      * platform/graphics/GraphicsLayerClient.h:
      * platform/graphics/ca/GraphicsLayerCA.cpp:
      * rendering/RenderInline.cpp:
      * rendering/RenderLayerBacking.cpp:
      * rendering/RenderLayerBacking.h:
      * rendering/RenderLayerCompositor.cpp:
      * rendering/RenderLayerCompositor.h:
      * rendering/RenderObject.cpp:
      
      Source/WebKit/chromium:
      
      * src/ChromeClientImpl.cpp:
      * src/ChromeClientImpl.h:
      
      Source/WebKit/efl:
      
      * WebCoreSupport/ChromeClientEfl.cpp:
      * WebCoreSupport/ChromeClientEfl.h:
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/ChromeClientGtk.cpp:
      * WebCoreSupport/ChromeClientGtk.h:
      
      Source/WebKit/haiku:
      
      * WebCoreSupport/ChromeClientHaiku.cpp:
      * WebCoreSupport/ChromeClientHaiku.h:
      
      Source/WebKit/mac:
      
      * Misc/WebNSControlExtras.m:
      (-[NSControl sizeToFitAndAdjustWindowHeight]): Updated this function to use more modern
      AppKit scale factor terminology. (This is unrelated to the rest of the patch.)
      
      * WebCoreSupport/WebChromeClient.h:
      * WebCoreSupport/WebChromeClient.mm:
      
      Source/WebKit/qt:
      
      * WebCoreSupport/ChromeClientQt.cpp:
      * WebCoreSupport/ChromeClientQt.h:
      
      Source/WebKit/win:
      
      * WebCoreSupport/WebChromeClient.cpp:
      * WebCoreSupport/WebChromeClient.h:
      
      Source/WebKit/wince:
      
      * WebCoreSupport/ChromeClientWinCE.cpp:
      * WebCoreSupport/ChromeClientWinCE.h:
      
      Source/WebKit/wx:
      
      * WebKitSupport/ChromeClientWx.cpp:
      * WebKitSupport/ChromeClientWx.h:
      
      Source/WebKit2:
      
      * Shared/UpdateInfo.cpp:
      * Shared/UpdateInfo.h:
      * Shared/WebPageCreationParameters.cpp:
      * Shared/WebPageCreationParameters.h:
      * UIProcess/API/C/WKPage.cpp:
      * UIProcess/API/efl/PageClientImpl.cpp:
      * UIProcess/API/efl/PageClientImpl.h:
      * UIProcess/API/gtk/PageClientImpl.h:
      * UIProcess/API/mac/PageClientImpl.h:
      * UIProcess/API/mac/PageClientImpl.mm:
      * UIProcess/BackingStore.cpp:
      * UIProcess/BackingStore.h:
      * UIProcess/DrawingAreaProxyImpl.cpp:
      * UIProcess/PageClient.h:
      * UIProcess/WebPageProxy.cpp:
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      * UIProcess/WebPopupMenuProxy.h:
      * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
      * UIProcess/gtk/WebPopupMenuProxyGtk.h:
      * UIProcess/mac/BackingStoreMac.mm:
      * UIProcess/mac/WebPageProxyMac.mm:
      * UIProcess/mac/WebPopupMenuProxyMac.h:
      * UIProcess/mac/WebPopupMenuProxyMac.mm:
      * UIProcess/qt/WebPopupMenuProxyQt.h:
      * UIProcess/win/WebPopupMenuProxyWin.h:
      * UIProcess/win/WebView.h:
      * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
      * WebProcess/WebCoreSupport/WebChromeClient.cpp:
      * WebProcess/WebCoreSupport/WebChromeClient.h:
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      * WebProcess/WebPage/DrawingAreaImpl.cpp:
      * WebProcess/WebPage/FindController.cpp:
      * WebProcess/WebPage/WebPage.cpp:
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/WebPage.messages.in:
      * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
      * WebProcess/WebPage/ca/LayerTreeHostCA.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@93040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      631cb90e
  18. 16 Jul, 2011 1 commit
    • simon.fraser@apple.com's avatar
      2011-07-16 Simon Fraser <simon.fraser@apple.com> · 1eae7d21
      simon.fraser@apple.com authored
              Add code to attempt to align compositing layers to pixel boundaries when page scale changes
              https://bugs.webkit.org/show_bug.cgi?id=64658
      
              Reviewed by Dan Bernstein.
      
              Implemented a new behavior on GraphicsLayerCA which attempts to keep layers pixel
              aligned as page scale changes.
      
              This requires denoting which layer has the page scale on it (it is assumed to be
              already aligned), via setAppliesPageScale(). We also now pass a scale and offset
              down through the GraphicsLayer commits, which are used to map layer bounds to display
              coordinates for rounding.
      
              * platform/graphics/GraphicsLayer.h: New flags and getters/setters for pixel alignment,
              and the layer that is the applier of the scale.
              (WebCore::GraphicsLayer::setMaintainsPixelAlignment):
              (WebCore::GraphicsLayer::maintainsPixelAlignment):
              (WebCore::GraphicsLayer::setAppliesPageScale):
              (WebCore::GraphicsLayer::appliesPageScale):
      
              * platform/graphics/GraphicsLayer.cpp:
              (WebCore::GraphicsLayer::GraphicsLayer): Initialize the new flags.
              (WebCore::GraphicsLayer::backingScaleFactor): Utility method that calls the client if there is one.
              (WebCore::GraphicsLayer::pageScaleFactor): Ditto.
      
              * platform/graphics/GraphicsLayerClient.h:
              (WebCore::GraphicsLayerClient::backingScaleFactor): Provide default implementation.
              (WebCore::GraphicsLayerClient::pageScaleFactor): Ditto.
      
              * platform/graphics/ca/GraphicsLayerCA.h: Pass scale and base-relative offset around
              to methods that need to update geometry during commit.
              Some new methods related to pixel alignment.
      
              * platform/graphics/ca/GraphicsLayerCA.cpp:
              (WebCore::GraphicsLayerCA::computePositionRelativeToBase): For single-layer commits,
              we have to compute the base-relative offset, and whether we're under the layer
              applying the scale by walking up the tree.
      
              (WebCore::GraphicsLayerCA::syncCompositingStateForThisLayerOnly): Call
              computePositionRelativeToBase() to get scaling parameters for the target layer.
      
              (WebCore::GraphicsLayerCA::recursiveCommitChanges): Pass flags related to scaling.
              positionRelativeToBase is an offset relative to the ancestor layer known to be pixel
              aligned. affectedByPageScale is true for layers which are descendants of the layer
              which applies the scale.
      
              (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Pass scale and offset.
              (WebCore::GraphicsLayerCA::updateGeometry): Call computePixelAlignment() to get
              pixel-aligned geometry. This only needs to be applied to layers which render content,
              so re-organize the code to use the unchanged layer geometry for the structural layer,
              but to apply the adjusted geometry to the m_layer.
      
              (WebCore::GraphicsLayerCA::updateStructuralLayer): Pass scale and offset.
              (WebCore::GraphicsLayerCA::ensureStructuralLayer): Ditto.
              (WebCore::GraphicsLayerCA::updateLayerDrawsContent): Ditto.
              (WebCore::GraphicsLayerCA::updateContentsScale): Ditto.
              (WebCore::GraphicsLayerCA::requiresTiledLayer): Ditto.
              (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Ditto.
              (WebCore::GraphicsLayerCA::setKeepPixelAligned): When set, dirties flags
              for properties that need to be recomputed.
              (WebCore::GraphicsLayerCA::noteChangesForScaleSensitiveProperties):
              (WebCore::isIntegral):
              (WebCore::GraphicsLayerCA::computePixelAlignment): Map our bounds to screen
              scale, round out to an integral rect, then map it back, adding a fudge factor
              so that CA backing stores don't end up being smaller than we expect because
              of integer truncation.
      
              * rendering/RenderLayerBacking.cpp:
              (WebCore::RenderLayerBacking::createGraphicsLayer): Turn on pixel alignment if
              the compositor says so.
              (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Set the RenderView's
              layer as the one applying the scale, for the main frame.
      
              * rendering/RenderLayerCompositor.h: New method.
              * rendering/RenderLayerCompositor.cpp:
              (WebCore::RenderLayerCompositor::keepLayersPixelAligned): Master switch for
              pixel alignment. Default to on.
              (WebCore::RenderLayerCompositor::ensureRootLayer): Give the two root-ish layers
              a client so they can ask for page scale if necessary.
      
      2011-07-16  Simon Fraser  <simon.fraser@apple.com>
      
              Add code to attempt to align compositing layers to pixel boundaries when page scale changes
              https://bugs.webkit.org/show_bug.cgi?id=64658
      
              Reviewed by Dan Bernstein.
      
              Removed implementation of pageScaleFactor() now that GraphicsLayerClient has
              a default implementation.
      
              * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
              * WebProcess/WebPage/ca/LayerTreeHostCA.h:
      
      2011-07-16  Simon Fraser  <simon.fraser@apple.com>
      
              Add code to attempt to align compositing layers to pixel boundaries when page scale changes
              https://bugs.webkit.org/show_bug.cgi?id=64658
      
              Reviewed by Dan Bernstein.
      
              Removed implementations of backingScaleFactor() and pageScaleFactor() now
              that GraphicsLayerClient has default implementations.
      
              * WebView.h:
      
      2011-07-16  Simon Fraser  <simon.fraser@apple.com>
      
              Add code to attempt to align compositing layers to pixel boundaries when page scale changes
              https://bugs.webkit.org/show_bug.cgi?id=64658
      
              Reviewed by Dan Bernstein.
      
              Removed implementations of backingScaleFactor() and pageScaleFactor() now
              that GraphicsLayerClient has default implementations.
      
              * src/PageOverlay.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91161 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1eae7d21
  19. 15 Jul, 2011 1 commit
    • simon.fraser@apple.com's avatar
      2011-07-15 Simon Fraser <simon.fraser@apple.com> · 53dd08df
      simon.fraser@apple.com authored
              Have GraphicsLayer pull their contentsScale, rather than pushing it onto them
              https://bugs.webkit.org/show_bug.cgi?id=64643
      
              Reviewed by Darin Adler.
      
              RenderLayerBacking would set the contentsScale on GraphicsLayers
              on creation, and update it when the pageScaleFactor changed. However,
              RenderLayerBacking doesn't really know what contentsScale is best
              for a layer, so instead, have GraphicsLayers call back through the
              GraphicsLayerClient to get the two relevant scale factors, and do
              their own computation of contentsScale.
      
              No testable behavior changes.
      
              * page/Frame.cpp:
              (WebCore::Frame::pageScaleFactorChanged): No need to pass the scale.
      
              * platform/graphics/GraphicsLayer.cpp:
              (WebCore::GraphicsLayer::notePageScaleFactorChangedIncludingDescendants):
              Recurse through the GraphicsLayer tree, calling pageScaleFactorChanged() on
              each layer.
      
              * platform/graphics/GraphicsLayer.h:
              (WebCore::GraphicsLayer::pageScaleFactorChanged):
              Remove contentsScale/setContentsScale
      
              * platform/graphics/GraphicsLayerClient.h:
              Add methods to fetch the backingScaleFactor() and pageScaleFactor().
      
              * platform/graphics/ca/GraphicsLayerCA.cpp:
              (WebCore::GraphicsLayerCA::GraphicsLayerCA): m_uncommittedChanges
              defaults to ContentsScaleChanged so we update contentsScale on
              the first flush.
      
              (WebCore::GraphicsLayerCA::setContentsToBackgroundColor):
              This was the wrong time to call updateContentsRect() and setupContentsLayer();
              those should be done at commit time, so moved to updateLayerBackgroundColor().
              (WebCore::GraphicsLayerCA::recursiveCommitChanges): Note whether we
              have any changes, and call didCommitChangesForLayer() on the client.
              (WebCore::GraphicsLayerCA::updateLayerBackgroundColor): Code moved to here.
              (WebCore::clampedContentsScaleForScale): No longer has any hysteresis
              on the scale, and now just clamps.
              (WebCore::GraphicsLayerCA::updateContentsScale): Fetch the scales
              from the client, and multiply them, then clamp.
              (WebCore::GraphicsLayerCA::requiresTiledLayer): This now takes
              contentsScale into account when deciding to use tiled layer,
              so that zooming in will cause layers to start tiling.
              (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Don't call
              setContentsScale(), but rather updateContentsScale().
              (WebCore::GraphicsLayerCA::pageScaleFactorChanged): Set the bits
              for properties that depend on the scale.
              (WebCore::GraphicsLayerCA::noteChangesForScaleSensitiveProperties):
              Note that contentsScale needs to be updated. At some point we might also
              need to dirty other properties.
              * platform/graphics/ca/GraphicsLayerCA.h: Moved the m_allowTiledLayer
              bool for better packing. No need for a m_contentsScale member now.
              * rendering/RenderLayer.cpp: Removed pageScaleFactorChanged().
              * rendering/RenderLayer.h: Ditto.
              * rendering/RenderLayerBacking.cpp:
              (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): No need
              to push the contents scale.
              (WebCore::RenderLayerBacking::updateForegroundLayer): Ditto.
              (WebCore::RenderLayerBacking::updateMaskLayer): Ditto.
              (WebCore::RenderLayerBacking::pageScaleFactor): GraphicsLayerClient method.
              (WebCore::RenderLayerBacking::backingScaleFactor): GraphicsLayerClient method.
              (WebCore::RenderLayerBacking::didCommitChangesForLayer): Send through
              to the compositor.
              * rendering/RenderLayerBacking.h: GraphicsLayerClient methods.
              * rendering/RenderLayerCompositor.cpp:
              (WebCore::RenderLayerCompositor::didFlushChangesForLayer): We'll use
              this later.
              (WebCore::RenderLayerCompositor::backingScaleFactor): GraphicsLayerClient method.
              (WebCore::RenderLayerCompositor::pageScaleFactor): Ditto.
              (WebCore::RenderLayerCompositor::didCommitChangesForLayer): Ditto.
              (WebCore::RenderLayerCompositor::ensureRootLayer): No need to push the contents scale.
              (WebCore::RenderLayerCompositor::pageScaleFactorChanged): Just call notePageScaleFactorChangedIncludingDescendants()
              on the root GraphicsLayer.
              * rendering/RenderLayerCompositor.h: Added GraphicsLayerClient methods.
      
      2011-07-15  Simon Fraser  <simon.fraser@apple.com>
      
              Have GraphicsLayer pull their contentsScale, rather than pushing it onto them
              https://bugs.webkit.org/show_bug.cgi?id=64643
      
              Reviewed by Darin Adler.
      
              Impement new GraphicsLayerClient methods related to contents scale,
              and don't push the scale.
      
              * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
              (WebKit::LayerTreeHostCA::initialize):
              (WebKit::LayerTreeHostCA::backingScaleFactor):
              (WebKit::LayerTreeHostCA::pageScaleFactor):
              (WebKit::LayerTreeHostCA::createPageOverlayLayer):
              * WebProcess/WebPage/ca/LayerTreeHostCA.h:
              (WebKit::LayerTreeHostCA::didCommitChangesForLayer):
      
      2011-07-15  Simon Fraser  <simon.fraser@apple.com>
      
              Have GraphicsLayer pull their contentsScale, rather than pushing it onto them
              https://bugs.webkit.org/show_bug.cgi?id=64643
      
              Reviewed by Darin Adler.
      
              Impement new GraphicsLayerClient methods related to contents scale.
      
              * src/PageOverlay.cpp:
              (WebKit::OverlayGraphicsLayerClientImpl::backingScaleFactor):
              (WebKit::OverlayGraphicsLayerClientImpl::pageScaleFactor):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91137 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      53dd08df
  20. 31 May, 2011 1 commit
    • mitz@apple.com's avatar
      <rdar://problem/9523192> REGRESSION (5.0.5-ToT, WebKit2): Flash to white when... · 0a66851b
      mitz@apple.com authored
      <rdar://problem/9523192> REGRESSION (5.0.5-ToT, WebKit2): Flash to white when navigating between pages on wsj.com, other sites (when navigating away from composited page)
      https://bugs.webkit.org/show_bug.cgi?id=61808
      
      Reviewed by Simon Fraser.
      
      WebKit1 has a mechanism to prevent the stale bits from the outgoing page from being erased
      until the incoming page has layout. Adapt this in WebKit2 to prevent the composited layer tree
      of the outgoing page from being torn down or updated until the incoming page has layout.
      
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::dispatchDidFirstLayout): Unfreeze the layer tree state.
      (WebKit::WebFrameLoaderClient::frameLoadCompleted): Ditto.
      (WebKit::WebFrameLoaderClient::provisionalLoadStarted): Freeze the layer tree state.
      
      * WebProcess/WebPage/DrawingArea.h:
      (WebKit::DrawingArea::setLayerTreeStateIsFrozen): Added.
      
      * WebProcess/WebPage/DrawingAreaImpl.cpp:
      (WebKit::DrawingAreaImpl::DrawingAreaImpl): Initialize new member variables.
      (WebKit::DrawingAreaImpl::setLayerTreeStateIsFrozen): Added. When freezing, sets the flag and
      disables layer flush scheduling and exiting accelerated compositing mode. When unfreezing,
      clears the flag and exits compositing mode if needed.
      (WebKit::DrawingAreaImpl::setRootCompositingLayer): Reset m_wantsToExitAcceleratedCompositingMode.
      (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode): Ditto.
      (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): Ditto.
      (WebKit::DrawingAreaImpl::exitAcceleratedCompositingModeSoon): If the layer tree state is frozen,
      bail out but set m_wantsToExitAcceleratedCompositingMode.
      
      * WebProcess/WebPage/DrawingAreaImpl.h:
      * WebProcess/WebPage/LayerTreeHost.h:
      
      * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
      (WebKit::LayerTreeHostCA::LayerTreeHostCA): Initialize m_layerFlushSchedulingEnabled.
      
      * WebProcess/WebPage/ca/LayerTreeHostCA.h:
      * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
      
      * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
      (WebKit::LayerTreeHostCAMac::scheduleLayerFlush): Bail out if scheduling is not enabled.
      (WebKit::LayerTreeHostCAMac::setLayerFlushSchedulingEnabled): Added. Sets the flag. If disabling
      flushing, cancels the pending flush.
      (WebKit::LayerTreeHostCAMac::flushPendingLayerChangesRunLoopObserverCallback): Added an assertion.
      
      * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
      (WebKit::LayerTreeHostCAWin::scheduleLayerFlush): Bail out if scheduling is not enabled.
      (WebKit::LayerTreeHostCAWin::setLayerFlushSchedulingEnabled): Added. Sets the flag. If disabling
      flushing, cancels the pending flush.
      
      * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@87755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0a66851b
  21. 20 Apr, 2011 1 commit
    • cmarrin@apple.com's avatar
      2011-04-20 Chris Marrin <cmarrin@apple.com> · 3c0ecbed
      cmarrin@apple.com authored
              Reviewed by Adam Roben.
      
              REGRESSION (WebKit2): CSS animations on pages that use accelerated compositing stop after switching tabs
              https://bugs.webkit.org/show_bug.cgi?id=57868
              
              Running CACFAnimations aren't remembered when layer tree is unparented and 
              then reparented. Added a new ensureAnimationsSubmitted function to 
              PlatformCALayer to traverse the tree and resubmit animations, setting the 
              beginTime to the original start time of the animation. This is called in WK2
              when layer tree is newly parented.
              
              I also consolidated currentTimeToMediaTime into PlatformCALayer so it can be shared
              between PlatformCALayer and GraphicsLayerCA.
      
              * platform/graphics/ca/GraphicsLayerCA.cpp:
              * platform/graphics/ca/PlatformCAAnimation.h:
                  Remember actual animation start time in CACFAnimation beginTime property
              * platform/graphics/ca/PlatformCALayer.h:
                  New ensureAnimationsSubmitted function which traverses layers and resubmits all animations
              * platform/graphics/ca/mac/PlatformCALayerMac.mm:
              * platform/graphics/ca/win/PlatformCALayerWin.cpp:
      
      2011-04-20  Chris Marrin  <cmarrin@apple.com>
      
              Reviewed by Adam Roben.
      
              REGRESSION (WebKit2): CSS animations on pages that use accelerated compositing stop after switching tabs
              https://bugs.webkit.org/show_bug.cgi?id=57868
              
              Subclassed setRootCompositingLayer so it can call ensureAnimationsSubmitted on Win.
      
              * WebProcess/WebPage/ca/LayerTreeHostCA.h:
                  Make setRootCompositingLayer protected so it can be called from subclass
              * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
                  Override setRootCompositingLayer to add call to root layer's
                  PlatformCALayer::ensureAnimationsSubmitted method
              * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@84416 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3c0ecbed
  22. 01 Apr, 2011 1 commit
    • aroben@apple.com's avatar
      Split LayerTreeHostCA into a base class and derived Mac and Win classes · d71e3913
      aroben@apple.com authored
      This will make it easier to customize the Mac and Windows implementations without adding too
      many #ifdefs.
      
      Fixes <http://webkit.org/b/57606> Windows and Mac should use separate LayerTreeHost classes
      
      Reviewed by Anders Carlsson.
      
      * WebKit2.xcodeproj/project.pbxproj: Added LayerTreeHostCAMac.h.
      
      * WebProcess/WebPage/LayerTreeHost.cpp:
      (WebKit::LayerTreeHost::create): Create a LayerTreeHostCAMac on Mac, and LayerTreeHostCAWin
      on Windows.
      
      * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
      (WebKit::LayerTreeHostCA::LayerTreeHostCA): Moved some code from here...
      (WebKit::LayerTreeHostCA::initialize): ...to here. This function will be called after the
      constructor returns, and thus can safely call functions that are pure virtual in this class
      and its base class. We now pass our LayerTreeContext to platformInitialize so that our
      derived classes can initialize it.
      (WebKit::LayerTreeHostCA::~LayerTreeHostCA): Removed Mac-specific code.
      
      (WebKit::LayerTreeHostCA::invalidate):
      (WebKit::LayerTreeHostCA::sizeDidChange):
      (WebKit::LayerTreeHostCA::forceRepaint):
      (WebKit::LayerTreeHostCA::didPerformScheduledLayerFlush):
      Removed platform* calls. Derived classes can just override these functions to do what they
      need.
      
      * WebProcess/WebPage/ca/LayerTreeHostCA.h: Removed Mac-specific pieces. Made some functions
      virtual so that derived classes can override them.
      
      * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h: Added.
      
      * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
      (WebKit::LayerTreeHostCAMac::create): Create and initialize a host.
      (WebKit::LayerTreeHostCAMac::LayerTreeHostCAMac): Simple constructor.
      (WebKit::LayerTreeHostCAMac::~LayerTreeHostCAMac): Moved code here from LayerTreeHostCA
      destructor.
      (WebKit::LayerTreeHostCAMac::platformInitialize): Removed direct uses of LayerTreeHostCA
      data members.
      
      (WebKit::LayerTreeHostCAMac::invalidate):
      (WebKit::LayerTreeHostCAMac::sizeDidChange):
      (WebKit::LayerTreeHostCAMac::forceRepaint):
      (WebKit::LayerTreeHostCAMac::didPerformScheduledLayerFlush):
      Renamed from platform*. Now call up to the base class.
      
      (WebKit::LayerTreeHostCAMac::flushPendingLayerChangesRunLoopObserverCallback): Updated type.
      
      * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
      (WebKit::LayerTreeHostCAWin::create): Create and initialize a host.
      
      (WebKit::LayerTreeHostCAWin::LayerTreeHostCAWin):
      (WebKit::LayerTreeHostCAWin::~LayerTreeHostCAWin):
      (WebKit::LayerTreeHostCAWin::platformInitialize):
      (WebKit::LayerTreeHostCAWin::scheduleLayerFlush):
      Stubbed out.
      
      * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h: Added.
      
      * win/WebKit2.vcproj: Added LayerTreeHostCAWin.h
      
      * win/WebKit2Apple.vsprops: Added WebProcess/WebPage/ca/win to the include path.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82675 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d71e3913
  23. 24 Mar, 2011 2 commits
    • aroben@apple.com's avatar
      Split Mac-specific parts of LayerTreeHostCA into LayerTreeHostCAMac.mm · e5ad338f
      aroben@apple.com authored
      Fixes <http://webkit.org/b/57046> LayerTreeHostMac's code should be shareable with Windows
      
      Reviewed by Anders Carlsson.
      
      * WebKit2.xcodeproj/project.pbxproj:
      
      * WebProcess/WebPage/ca/LayerTreeHostCA.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.mm.
      (WebKit::LayerTreeHostCA::LayerTreeHostCA): Moved some Mac-specific code to
      LayerTreeHostCAMac.mm.
      (WebKit::LayerTreeHostCA::~LayerTreeHostCA): Wrapped some Mac-specific code in
      PLATFORM(MAC).
      
      (WebKit::LayerTreeHostCA::invalidate):
      (WebKit::LayerTreeHostCA::sizeDidChange):
      (WebKit::LayerTreeHostCA::forceRepaint):
      Moved some Mac-specific code to LayerTreeHostCAMac.mm.
      
      (WebKit::LayerTreeHostCA::performScheduledLayerFlush): Renamed from
      flushPendingLayerChangesRunLoopObserverCallback. Moved some code from here...
      (WebKit::LayerTreeHostCA::didPerformScheduledLayerFlush): ...to here. Moved some
      Mac-specific code to LayerTreeHostCAMac.mm.
      
      * WebProcess/WebPage/ca/LayerTreeHostCA.h: Added new functions, wrapped some Mac-specific
      declarations in PLATFORM(MAC).
      
      * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm: Added.
      (WebKit::LayerTreeHostCA::platformInitialize):
      (WebKit::LayerTreeHostCA::scheduleLayerFlush):
      (WebKit::LayerTreeHostCA::platformInvalidate):
      (WebKit::LayerTreeHostCA::platformSizeDidChange):
      (WebKit::LayerTreeHostCA::platformForceRepaint):
      (WebKit::LayerTreeHostCA::flushPendingLayerChangesRunLoopObserverCallback):
      (WebKit::LayerTreeHostCA::platformDidPerformScheduledLayerFlush):
      Code was extracted from LayerTreeHostCA.cpp.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81903 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e5ad338f
    • aroben@apple.com's avatar
      Rename LayerTreeHostMac to LayerTreeHostCA · 4d9e37d3
      aroben@apple.com authored
      This is the first step toward sharing code with Windows.
      
      Fixes <http://webkit.org/b/57051>.
      
      Reviewed by Anders Carlsson.
      
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/WebPage/LayerTreeHost.cpp:
      (WebKit::LayerTreeHost::create):
      Updated for rename.
      
      * WebProcess/WebPage/ca/LayerTreeHostCA.h: Renamed from Source/WebKit2/WebProcess/WebPage/mac/LayerTreeHostMac.h.
      * WebProcess/WebPage/ca/LayerTreeHostCA.mm: Renamed from Source/WebKit2/WebProcess/WebPage/mac/LayerTreeHostMac.mm.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81902 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4d9e37d3
  24. 24 Feb, 2011 1 commit
    • andersca@apple.com's avatar
      2011-02-24 Anders Carlsson <andersca@apple.com> · 936a1185
      andersca@apple.com authored
              Reviewed by Simon Fraser.
      
              ASSERTION FAILED: !isInAcceleratedCompositingMode() when entering accelerated compositing early
              https://bugs.webkit.org/show_bug.cgi?id=55162
              <rdar://problem/9048523>
      
              * WebProcess/WebPage/DrawingAreaImpl.cpp:
              (WebKit::DrawingAreaImpl::updateState):
              Call setShouldNotifyAfterNextScheduledLayerFlush(false) so the web process process won't send an
              EnterAcceleratedCompositingMode message.
      
              (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
              setShouldNotifyAfterNextScheduledLayerFlush now takes a boolean.
      
              * WebProcess/WebPage/LayerTreeHost.h:
              * WebProcess/WebPage/mac/LayerTreeHostMac.h:
              * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
              (WebKit::LayerTreeHostMac::setShouldNotifyAfterNextScheduledLayerFlush):
              Make this take a boolean.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      936a1185
  25. 18 Feb, 2011 1 commit
    • andersca@apple.com's avatar
      2011-02-18 Anders Carlsson <andersca@apple.com> · 86e74168
      andersca@apple.com authored
              Reviewed by Simon Fraser.
      
              WKView flashes when entering/exiting compositing mode
              https://bugs.webkit.org/show_bug.cgi?id=54695
              <rdar://problem/9011554>
      
              * UIProcess/API/mac/WKView.mm:
              (-[WKView _exitAcceleratedCompositingMode]):
              Remove the layer hosting view before clearing out its layer, otherwise we can get
              white flashes when exiting accelerated compositing mode.
      
              * WebProcess/WebPage/DrawingAreaImpl.cpp:
              When entering accelerated compositing mode, we want to defer sending the message
              until we've actually committed the layer tree and pushed all changes over to the
              UI process.
      
              (WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
              Tell the layer tree host to force a repaint. This will ensure that all layer tree
              changes are pushed over to the UI process. When that is done, send the new layer tree
              context over to the UI process.
      
              (WebKit::DrawingAreaImpl::setRootCompositingLayer):
              When exiting compositing mode in response to a didSetSize, we want to exit accelerated 
              compositing mode right away to avoid flashes. This is safe since we've laid out the page
              already so we won't end up reentering setRootCompositingLayer.
      
              (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
              Tell the layer tree host to notify us when the next layer tree flush happened, so we can
              let the UI process know. If we're entering accelerated compositing mode in response to a
              SetSize message, the new layer tree context will be passed in the DidSetSize message.
      
              * WebProcess/WebPage/DrawingAreaImpl.h:
              Add layerHostDidFlushLayers.
      
              * WebProcess/WebPage/LayerTreeHost.h:
              Add setShouldNotifyAfterNextScheduledLayerFlush.
      
              * WebProcess/WebPage/mac/LayerTreeHostMac.h:
              Add a m_notifyAfterScheduledLayerFlush flag.
      
              * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
              (WebKit::LayerTreeHostMac::LayerTreeHostMac):
              Initialize m_notifyAfterScheduledLayerFlush to false.
      
              (WebKit::LayerTreeHostMac::setShouldNotifyAfterNextScheduledLayerFlush):
              Set m_notifyAfterScheduledLayerFlush to true.
      
              (WebKit::LayerTreeHostMac::flushPendingLayerChangesRunLoopObserverCallback):
              If m_notifyAfterScheduledLayerFlush is true, call DrawingAreaImpl::layerHostDidFlushLayers.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      86e74168
  26. 16 Feb, 2011 1 commit
    • andersca@apple.com's avatar
      2011-02-16 Anders Carlsson <andersca@apple.com> · 230494b1
      andersca@apple.com authored
              Reviewed by Adam Roben.
      
              Assertion failure in DrawingAreaImpl::display when calling WKPageForceRepaint on a page that uses accelerated compositing
              https://bugs.webkit.org/show_bug.cgi?id=54575
              <rdar://problem/8979594>
      
              Add test.
              * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
              * TestWebKitAPI/Tests/WebKit2/ForceRepaint.cpp: Added.
              (TestWebKitAPI::didForceRepaint):
              (TestWebKitAPI::didFinishLoadForFrame):
              (TestWebKitAPI::TEST):
              * TestWebKitAPI/Tests/WebKit2/simple-accelerated-compositing.html: Added.
              * TestWebKitAPI/win/TestWebKitAPI.vcproj:
              * TestWebKitAPI/win/copy-resources.cmd:
      2011-02-16  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Adam Roben.
      
              Assertion failure in DrawingAreaImpl::display when calling WKPageForceRepaint on a page that uses accelerated compositing
              https://bugs.webkit.org/show_bug.cgi?id=54575
              <rdar://problem/8979594>
      
              * WebProcess/WebPage/DrawingAreaImpl.cpp:
              (WebKit::DrawingAreaImpl::forceRepaint):
              If there is a layer tree host, ask it to force a repaint instead.
      
              * WebProcess/WebPage/LayerTreeHost.h:
              * WebProcess/WebPage/mac/LayerTreeHostMac.h:
              * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
              (WebKit::LayerTreeHostMac::forceRepaint):
              Flush any layer changes, then flush and synchronize the current CA transaction.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      230494b1
  27. 08 Feb, 2011 1 commit
    • andersca@apple.com's avatar
      2011-02-08 Anders Carlsson <andersca@apple.com> · 874aa090
      andersca@apple.com authored
              Reviewed by Beth Dakin.
      
              Assertion failure !isInAcceleratedCompositingMode() in DrawingAreaProxyImpl::incorporateUpdate()
              https://bugs.webkit.org/show_bug.cgi?id=54046
              <rdar://problem/8973960>
      
              DrawingAreaImpl::setRootCompositingLayer can be called with a new layer even when already
              in accelerated compositing mode. Similarly, it can be called with a null layer even when not
              in accelerated compositing mode. Make the drawing area and layer tree host handle both these cases.
      
              * WebProcess/WebPage/DrawingAreaImpl.cpp:
              (WebKit::DrawingAreaImpl::setRootCompositingLayer):
              Only call enterAcceleratedCompositingMode if there is no layer tree host, otherwise
              just call LayerTreeHost::setRootCompositingLayer.
      
              (WebKit::DrawingAreaImpl::setSize):
              Add an assert.
      
              (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
              Assert that we don't have a layer tree host.
      
              (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
              Assert that we do have a layer tree host.
      
              (WebKit::DrawingAreaImpl::display):
              If the call to display caused the page to enter accelerated compositing mode, we don't
              want to send back an Update message.
      
              * WebProcess/WebPage/LayerTreeHost.cpp:
              (WebKit::LayerTreeHost::create):
              * WebProcess/WebPage/LayerTreeHost.h:
              Create no longer takes a graphics layer.
      
              * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
              (WebKit::LayerTreeHostMac::create):
              (WebKit::LayerTreeHostMac::LayerTreeHostMac):
              Create no longer takes a graphics layer.
              
              (WebKit::LayerTreeHostMac::setRootCompositingLayer):
              Set the new root compositing layer.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77996 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      874aa090
  28. 07 Feb, 2011 2 commits
    • andersca@apple.com's avatar
      2011-02-07 Anders Carlsson <andersca@apple.com> · dbb3801b
      andersca@apple.com authored
              Reviewed by Sam Weinig.
      
              Some content is not covered by Find-on-page overlay
              https://bugs.webkit.org/show_bug.cgi?id=53937
              <rdar://problem/8711353>
      
              * WebProcess/WebPage/DrawingAreaImpl.cpp:
              (WebKit::DrawingAreaImpl::didInstallPageOverlay):
              Call LayerTreeHost::didInstallPageOverlay.
      
              (WebKit::DrawingAreaImpl::didUninstallPageOverlay):
              Call LayerTreeHost::didUninstallPageOverlay.
      
              (WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay):
              Call LayerTreeHost::setPageOverlayNeedsDisplay.
      
              * WebProcess/WebPage/FindController.cpp:
              (WebKit::FindController::drawRect):
              Remove a bogus assertion.
      
              * WebProcess/WebPage/LayerTreeHost.h:
              Add new pure virtual member functions.
      
              * WebProcess/WebPage/PageOverlay.cpp:
              (WebKit::PageOverlay::setNeedsDisplay):
              Call DrawingArea::setPageOverlayNeedsDisplay.
      
              * WebProcess/WebPage/WebPage.cpp:
              (WebKit::WebPage::installPageOverlay):
              Make sure to call PageOverlay::setNeedsDisplay after the page overlay has been installed.
          
              * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
              (WebKit::LayerTreeHostMac::LayerTreeHostMac):
              Create the page overlay layer if needed.
      
              (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay):
              Invalidate the page overlay layer as well.
      
              (WebKit::LayerTreeHostMac::sizeDidChange):
              Resize the page overlay layer.
      
              (WebKit::LayerTreeHostMac::didInstallPageOverlay):
              Create the page overlay layer.
      
              (WebKit::LayerTreeHostMac::didUninstallPageOverlay):
              Destroy the page overlay layer.
      
              (WebKit::LayerTreeHostMac::setPageOverlayNeedsDisplay):
              Call setNeedsDisplay on the page overlay layer.
      
              (WebKit::LayerTreeHostMac::paintContents):
              Handle painting the page overlay layer.
      
              (WebKit::LayerTreeHostMac::flushPendingLayerChanges):
              Flush the page overlay layer changes as well.
      
              (WebKit::LayerTreeHostMac::createPageOverlayLayer):
              Create a layer and add it as a sublayer of the root layer.
      
              (WebKit::LayerTreeHostMac::destroyPageOverlayLayer):
              Destroy the page overlay layer.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dbb3801b
    • andersca@apple.com's avatar
      2011-02-07 Anders Carlsson <andersca@apple.com> · 1fb60fb3
      andersca@apple.com authored
              Reviewed by Dan Bernstein.
      
              Rename some drawing area related member functions
              https://bugs.webkit.org/show_bug.cgi?id=53935
      
              * WebProcess/WebPage/DrawingArea.h:
              (WebKit::DrawingArea::setPageOverlayNeedsDisplay):
              * WebProcess/WebPage/DrawingAreaImpl.cpp:
              (WebKit::DrawingAreaImpl::setNeedsDisplay):
              (WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay):
              * WebProcess/WebPage/DrawingAreaImpl.h:
              * WebProcess/WebPage/LayerTreeHost.h:
              * WebProcess/WebPage/mac/LayerTreeHostMac.h:
              * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
              (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay):
              (WebKit::LayerTreeHostMac::scrollNonCompositedContents):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77837 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1fb60fb3
  29. 03 Feb, 2011 3 commits
    • andersca@apple.com's avatar
      2011-02-03 Anders Carlsson <andersca@apple.com> · ca3df5c3
      andersca@apple.com authored
              Reviewed by Sam Weinig.
      
              Paint non-composited contents in a layer
              https://bugs.webkit.org/show_bug.cgi?id=53742
      
              * WebProcess/WebPage/DrawingAreaImpl.cpp:
              (WebKit::DrawingAreaImpl::setNeedsDisplay):
              Call LayerTreeHost::setNonCompositedContentsNeedDisplayInRect.
      
              (WebKit::DrawingAreaImpl::scroll):
              Call LayerTreeHost::scrollNonCompositedContents.
      
              (WebKit::DrawingAreaImpl::setSize):
              Call LayerTreeHost::sizeDidChange.
      
              * WebProcess/WebPage/LayerTreeHost.h:
              Add new pure virtual member functions.
      
              * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
              (WebKit::LayerTreeHostMac::LayerTreeHostMac):
              Create the non-composited content layer.
      
              (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplayInRect):
              Call setNeedsDisplay on the GraphicsLayer.
      
              (WebKit::LayerTreeHostMac::scrollNonCompositedContents):
              Just call setNonCompositedContentsNeedDisplayInRect.
      
              (WebKit::LayerTreeHostMac::sizeDidChange):
              Resize the layers and flush any changes.
              
              (WebKit::LayerTreeHostMac::paintContents):
              Call WebPage::drawRect.
      
              (WebKit::LayerTreeHostMac::flushPendingLayerChangesRunLoopObserverCallback):
              Lay out the web page.
      
              (WebKit::LayerTreeHostMac::flushPendingLayerChanges):
              Call syncCompositingStateForThisLayerOnly on the non-composited content layer.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77575 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ca3df5c3
    • andersca@apple.com's avatar
      2011-02-03 Anders Carlsson <andersca@apple.com> · fc52960d
      andersca@apple.com authored
              Reviewed by Darin Adler.
      
              Don't send enter/exit accelerated compositing mode messages when handling setSize
              https://bugs.webkit.org/show_bug.cgi?id=53706
      
              Don't send EnterAcceleratedCompositingMode/ExitAcceleratedCompositing mode when
              the mode changes happen as a result of relayout in setSize, since an updated state
              is going to be sent back in the DidSetSize message.
              
              * UIProcess/DrawingAreaProxyImpl.cpp:
              (WebKit::DrawingAreaProxyImpl::didSetSize):
              Add an assert.
      
              * WebProcess/WebPage/DrawingAreaImpl.cpp:
              (WebKit::DrawingAreaImpl::DrawingAreaImpl):
              Initialize m_inSetSize.
      
              (WebKit::DrawingAreaImpl::setRootCompositingLayer):
              Factor out code into enterAcceleratedCompositingMode and exitAcceleratedCompositingMode.
      
              (WebKit::DrawingAreaImpl::setSize):
              Set m_inSetSize to true while handling setSize.
      
              (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
              (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
              Take over the message sending responsibility from LayerTreeHostMac, and don't send messages
              if we're currently handling a SetSize message.
      
              * WebProcess/WebPage/DrawingAreaImpl.h:
              Add m_inSetSize.
      
              * WebProcess/WebPage/LayerTreeHost.h:
              Add layerTreeHost getter.
      
              * WebProcess/WebPage/mac/LayerTreeHostMac.h:
              * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
              (WebKit::LayerTreeHostMac::LayerTreeHostMac):
              Don't send EnterAcceleratedCompositingMode messages.
      
              (WebKit::LayerTreeHostMac::layerTreeContext):
              Add getter for the current layer tree context.
      
              (WebKit::LayerTreeHostMac::invalidate):
              Don't send ExitAcceleratedCompositingMode messages.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77529 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fc52960d
    • andersca@apple.com's avatar
      2011-02-03 Anders Carlsson <andersca@apple.com> · cc0a31e2
      andersca@apple.com authored
              Reviewed by Sam Weinig.
      
              Make the layer tree host keep track of the layer tree context
              https://bugs.webkit.org/show_bug.cgi?id=53698
      
              Add a LayerTreeContext member variable to the LayerTreeHost object,
              and also add a seed count to the LayerTreeContext so we can keep track of 
              how layer tree contexts relate to each other.
      
              * Shared/LayerTreeContext.h:
              * Shared/mac/LayerTreeContextMac.mm:
              (WebKit::LayerTreeContext::LayerTreeContext):
              (WebKit::LayerTreeContext::makeWithSeed):
              (WebKit::LayerTreeContext::encode):
              (WebKit::LayerTreeContext::decode):
      
              * WebProcess/WebPage/mac/LayerTreeHostMac.h:
              Add the layer tree context as a member variable.
      
              * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
              (WebKit::LayerTreeHostMac::LayerTreeHostMac):
              Initialize the layer tree context.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77524 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cc0a31e2
  30. 01 Feb, 2011 4 commits
    • andersca@apple.com's avatar
      2011-02-01 Anders Carlsson <andersca@apple.com> · 94c1770f
      andersca@apple.com authored
              Reviewed by Dan Bernstein.
      
              Attach the layer tree in the UI process
              https://bugs.webkit.org/show_bug.cgi?id=53560
      
              * UIProcess/API/mac/WKView.mm:
              (-[WKView _enterAcceleratedCompositingMode:]):
              Make a render layer and add it as a sublayer of our root layer.
      
              * WebProcess/WebPage/mac/LayerTreeHostMac.h:
              Make LayerTreeHostMac a GraphicsLayerClient.
      
              * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
              (WebKit::LayerTreeHostMac::LayerTreeHostMac):
              Create a root layer, add the layer subtree as a child of the root layer.
      
              (WebKit::LayerTreeHostMac::~LayerTreeHostMac):
              Assert that m_rootLayer is null.
      
              (WebKit::LayerTreeHostMac::invalidate):
              Null out m_rootLayer.
      
              (WebKit::LayerTreeHostMac::notifyAnimationStarted):
              (WebKit::LayerTreeHostMac::notifySyncRequired):
              (WebKit::LayerTreeHostMac::paintContents):
              Add stubs.
      
              (WebKit::LayerTreeHostMac::showDebugBorders):
              (WebKit::LayerTreeHostMac::showRepaintCounter):
              Return the correct settings.
      
              (WebKit::LayerTreeHostMac::flushPendingLayerChanges):
              Flush the root layer changes.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77345 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      94c1770f
    • andersca@apple.com's avatar
      2011-02-01 Anders Carlsson <andersca@apple.com> · f3967428
      andersca@apple.com authored
              Reviewed by Adam Roben.
      
              Send messages when entering/exiting accelerated compositing
              https://bugs.webkit.org/show_bug.cgi?id=53534
      
              * Shared/LayerTreeContext.h: Added.
              * Shared/mac/LayerTreeContextMac.mm: Added.
              Add new LayerTreeContext which holds all information needed to enter
              accelerated compositing mode.
      
              * UIProcess/DrawingAreaProxy.h:
              (WebKit::DrawingAreaProxy::enterAcceleratedCompositingMode):
              (WebKit::DrawingAreaProxy::exitAcceleratedCompositingMode):
              Add empty stubs.
      
              * UIProcess/DrawingAreaProxy.messages.in:
              Add new messgaes.
      
              * UIProcess/DrawingAreaProxyImpl.cpp:
              (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
              (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
              * UIProcess/DrawingAreaProxyImpl.h:
              Add empty stubs.
      
              * WebKit2.xcodeproj/project.pbxproj:
              Add new files.
      
              * WebProcess/WebPage/mac/LayerTreeHostMac.h:
              * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
              (WebKit::LayerTreeHostMac::LayerTreeHostMac):
              (WebKit::LayerTreeHostMac::invalidate):
              Send messages.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f3967428
    • andersca@apple.com's avatar
      2011-02-01 Anders Carlsson <andersca@apple.com> · 3fd79996
      andersca@apple.com authored
              Reviewed by Adam Roben.
      
              Make LayerTreeHost ref counted
              https://bugs.webkit.org/show_bug.cgi?id=53530
      
              LayerTreeHostMac will soon be able to trigger layout, which could cause
              the page to leave accelerated compositing mode and free the LayerTreeHostMac object.
      
              Making LayerTreeHost ref counted will let LayerTreeHostMac protect itself while triggering layout.
      
              * WebProcess/WebPage/DrawingAreaImpl.cpp:
              (WebKit::DrawingAreaImpl::setRootCompositingLayer):
              * WebProcess/WebPage/DrawingAreaImpl.h:
              * WebProcess/WebPage/LayerTreeHost.cpp:
              (WebKit::LayerTreeHost::create):
              * WebProcess/WebPage/LayerTreeHost.h:
              * WebProcess/WebPage/mac/LayerTreeHostMac.h:
              * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
              (WebKit::LayerTreeHostMac::create):
              (WebKit::LayerTreeHostMac::LayerTreeHostMac):
              (WebKit::LayerTreeHostMac::~LayerTreeHostMac):
              (WebKit::LayerTreeHostMac::invalidate):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3fd79996
    • andersca@apple.com's avatar
      2011-02-01 Anders Carlsson <andersca@apple.com> · f16aa712
      andersca@apple.com authored
              Reviewed by Adam Roben.
      
              Move flushPendingLayerChanges to LayerTreeHostMac
              https://bugs.webkit.org/show_bug.cgi?id=53525
      
              In preparation for adding more Mac specific code to flushPendingLayerChanges.
      
              * WebProcess/WebPage/LayerTreeHost.cpp:
              * WebProcess/WebPage/LayerTreeHost.h:
              * WebProcess/WebPage/mac/LayerTreeHostMac.h:
              * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
              (WebKit::LayerTreeHostMac::flushPendingLayerChanges):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77282 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f16aa712
  31. 31 Jan, 2011 1 commit
    • andersca@apple.com's avatar
      2011-01-31 Anders Carlsson <andersca@apple.com> · cc230861
      andersca@apple.com authored
              Reviewed by Adam Roben.
      
              Make LayerTreeHost an abstract base class and make LayerTreeHostMac inherit from it
              https://bugs.webkit.org/show_bug.cgi?id=53432
      
              * WebKit2.xcodeproj/project.pbxproj:
              Add LayerTreeHostMac.h.
      
              * WebProcess/WebPage/DrawingAreaImpl.cpp:
              * WebProcess/WebPage/DrawingAreaImpl.h:
              Make m_layerTreeHost an OwnPtr and initialize/destroy it appropriately.
      
              * WebProcess/WebPage/LayerTreeHost.cpp:
              (WebKit::LayerTreeHost::create):
              On Mac, create a LayerTreeHostMac instance.
      
              (WebKit::LayerTreeHost::~LayerTreeHost):
              No need to call platformInvalidate anymore.
      
              * WebProcess/WebPage/LayerTreeHost.h:
              * WebProcess/WebPage/mac/LayerTreeHostMac.h: Added.
              * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
              (WebKit::LayerTreeHostMac::~LayerTreeHostMac):
              Invalidate the run loop observer here instead of in platformInvalidate.
      
              (WebKit::LayerTreeHostMac::scheduleLayerFlush):
              (WebKit::LayerTreeHostMac::flushPendingLayerChangesRunLoopObserverCallback):
              These are now members of LayerTreeHostMac.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77139 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cc230861
  32. 25 Jan, 2011 1 commit
    • andersca@apple.com's avatar
      2011-01-25 Anders Carlsson <andersca@apple.com> · b492e3a8
      andersca@apple.com authored
              Reviewed by Adam Roben.
      
              Add and implement LayerTreeHost::scheduleLayerFlush
              https://bugs.webkit.org/show_bug.cgi?id=53135
      
              * WebKit2.xcodeproj/project.pbxproj:
              Add LayerTreeHostMac.mm.
      
              * WebProcess/WebPage/DrawingAreaImpl.cpp:
              (WebKit::DrawingAreaImpl::scheduleCompositingLayerSync):
              Call LayerTreeHost::scheduleLayerFlush.
      
              * WebProcess/WebPage/LayerTreeHost.cpp:
              (WebKit::LayerTreeHost::~LayerTreeHost):
              Call platformInvalidate().
      
              (WebKit::LayerTreeHost::flushPendingLayerChanges):
              Rename from syncCompositingLayers.
      
              * WebProcess/WebPage/mac/LayerTreeHostMac.mm: Added.
              (WebKit::LayerTreeHost::scheduleLayerFlush):
              Create a run loop observer if needed. This code is copied from LayerBackedDrawingAreaMac.mm
      
              (WebKit::LayerTreeHost::platformInvalidate):
              Invalidate the run loop observer.
      
              (WebKit::LayerTreeHost::flushPendingLayerChangesRunLoopObserverCallback):
              Call flushPendingChanges() and remove the run loop observer if it succeeded.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b492e3a8