Ignore:
Timestamp:
Oct 2, 2013, 2:14:26 PM (12 years ago)
Author:
[email protected]
Message:

[mac] Stop using DrawingAreaImpl on PLATFORM(MAC)
https://bugs.webkit.org/show_bug.cgi?id=121859
<rdar://problem/15069359>

Reviewed by Anders Carlsson.

The Mac port will now use tiled drawing for all WebKit2 views.

  • Shared/DrawingAreaInfo.h:

Don't include DrawingAreaTypeImpl as a valid DrawingAreaType on Mac.

  • UIProcess/API/mac/WKView.mm:

(-[WKView drawRect:]):
Remove our implementation of drawRect that paints from DrawingAreaImpl's backing store.

(-[WKView _shouldUseTiledDrawingArea]):
Removed. Always treated as if it were true, now.

(-[WKView _createDrawingAreaProxy]):
Always create a TiledCoreAnimationDrawingAreaProxy now.

(-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
(-[WKView wantsUpdateLayer]):
WKView always wants a layer, etc.

  • UIProcess/BackingStore.h:

Remove Mac-specific BackingStore code, only used for DrawingAreaImpl on Mac.

  • UIProcess/DrawingAreaProxy.h:

Remove an unneeded include.

  • UIProcess/mac/BackingStoreMac.mm: Removed.
  • WebKit2.xcodeproj/project.pbxproj:

Remove a bunch of files we don't need to build anymore.

  • WebProcess/WebPage/DrawingArea.cpp:

(WebKit::DrawingArea::create):
Never create a DrawingAreaImpl on Mac.

  • WebProcess/WebPage/DrawingAreaImpl.cpp:

(WebKit::DrawingAreaImpl::updatePreferences):
(WebKit::DrawingAreaImpl::resumePainting):

  • WebProcess/WebPage/DrawingAreaImpl.h:

Remove Mac-specific DrawingAreaImpl code.

  • WebProcess/WebPage/LayerTreeHost.cpp:

(WebKit::LayerTreeHost::create):

  • WebProcess/WebPage/mac/LayerTreeHostMac.h: Removed.
  • WebProcess/WebPage/mac/LayerTreeHostMac.mm: Removed.
  • page/FrameView.cpp:

(WebCore::FrameView::addTrackedRepaintRect):
(WebCore::FrameView::repaintContentRectangle):

  • page/FrameView.h:

Factor out the coordinate conversion and appending of new repaint rects on FrameView.

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::dumpProperties):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::shouldDumpPropertyForLayer):
Don't dump repaint rects on the root tile cache, they'll be included at the top,
where FrameView's repaints are normally included.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::setContentsNeedDisplay):
(WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
Push the root tile cache's tracked repaint rects to FrameView instead.

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::shouldUseThreadedScrolling):
(WTR::updateThreadedScrollingForCurrentTest):
(WTR::TestInvocation::invoke):

  • WebKitTestRunner/mac/PlatformWebViewMac.mm:

(-[TestRunnerWKView initWithFrame:contextRef:pageGroupRef:relatedToPage:useThreadedScrolling:]):
(WTR::PlatformWebView::PlatformWebView):
(WTR::PlatformWebView::viewSupportsOptions):
Rename the tiled drawing switch to threaded scrolling, since that's really
all it switches now that we use tiled drawing everywhere.

Use an unbuffered window, as well, to avoid snapshotting issues on some platforms
and to more closely match the case we're interested in testing.

  • platform/mac-wk2/TestExpectations:
  • platform/mac-wk2/compositing/contents-opaque/body-background-painted-expected.txt: Added.
  • platform/mac-wk2/compositing/contents-opaque/body-background-skipped-expected.txt: Added.
  • platform/mac-wk2/compositing/rtl/rtl-absolute-expected.txt: Added.
  • platform/mac-wk2/compositing/rtl/rtl-absolute-overflow-expected.txt: Added.
  • platform/mac-wk2/compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt: Added.

Add WebKit2 results, because we dump non-white background color on the root layer now.

  • platform/mac-wk2/compositing/repaint/fixed-background-scroll-expected.txt: Added.

New WebKit2 result; repaint rects are showing up now.

  • platform/mac-wk2/compositing/rtl/rtl-fixed-expected.txt:
  • platform/mac-wk2/compositing/rtl/rtl-fixed-overflow-expected.txt:

Slightly adjusted results.

  • platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt: Added.
  • platform/mac-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: Added.
  • platform/mac-wk2/compositing/tiling/tile-cache-zoomed-expected.txt: Added.
  • platform/mac-wk2/compositing/tiling/tiled-layer-resize-expected.txt: Added.

New WebKit2 results; we show the root tile cache if layerTreeAsText is asked to dump tile caches.

  • platform/mac-wk2/editing/input/caret-at-the-edge-of-contenteditable-expected.txt: Added.
  • platform/mac-wk2/editing/input/reveal-caret-of-multiline-contenteditable-expected.txt: Added.
  • platform/mac-wk2/fast/block/basic/020-expected.txt: Added.
  • platform/mac-wk2/fast/dynamic/012-expected.txt: Added.
  • platform/mac-wk2/fast/dynamic/layer-hit-test-crash-expected.txt: Added.
  • platform/mac-wk2/fast/repaint/layer-hide-when-needs-layout-expected.txt: Added.
  • platform/mac-wk2/fast/text/whitespace/028-expected.txt: Added.
  • platform/mac-wk2/fast/layers/layer-visibility-expected.txt: Added.
  • platform/mac-wk2/fast/layers/layer-visibility-sublayer-expected.txt: Added.
  • platform/mac-wk2/fast/repaint/invisible-objects-expected.txt: Added.

New WebKit2 results; additional compositing layers.

  • platform/mac-wk2/tiled-drawing/window-server-snapshots-work-expected-mismatch.html: Added.
  • platform/mac-wk2/tiled-drawing/window-server-snapshots-work.html: Added.

New test to ensure that window-server snapshots work with tiled drawing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/page/FrameView.cpp

    r156622 r156793  
    20792079}
    20802080
     2081void FrameView::addTrackedRepaintRect(const IntRect& r)
     2082{
     2083    if (!m_isTrackingRepaints || r.isEmpty())
     2084        return;
     2085
     2086    IntRect repaintRect = r;
     2087    repaintRect.move(-scrollOffset());
     2088    m_trackedRepaintRects.append(repaintRect);
     2089}
     2090
    20812091const unsigned cRepaintRectUnionThreshold = 25;
    20822092
     
    20852095    ASSERT(!frame().ownerElement());
    20862096
    2087     if (m_isTrackingRepaints) {
    2088         IntRect repaintRect = r;
    2089         repaintRect.move(-scrollOffset());
    2090         m_trackedRepaintRects.append(repaintRect);
    2091     }
     2097    addTrackedRepaintRect(r);
    20922098
    20932099    double delay = m_deferringRepaints ? 0 : adjustedDeferredRepaintDelay();
Note: See TracChangeset for help on using the changeset viewer.