Changeset 145039 in webkit


Ignore:
Timestamp:
Mar 6, 2013, 9:58:57 PM (12 years ago)
Author:
timothy_horton@apple.com
Message:

[wk2] Page overlays shouldn't dirty the entire layer when flushing if the main frame can't scroll
https://bugs.webkit.org/show_bug.cgi?id=111662
<rdar://problem/13355808>

Reviewed by Simon Fraser.

Instead of setNeedsDisplay()ing the whole page overlay layer every time through
TCADA::flushLayers, do it at scroll time instead. Repainting on scroll is
necessary to keep things painted in the right place when we scroll (the overlay
is fixed to the size of the view), but is quite wasteful in apps that don’t scroll.

This works with threaded scrolling because overlay installation forces us
into main-thread scrolling mode.

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::scroll):
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r145037 r145039  
     12013-03-06  Tim Horton  <timothy_horton@apple.com>
     2
     3        [wk2] Page overlays shouldn't dirty the entire layer when flushing if the main frame can't scroll
     4        https://bugs.webkit.org/show_bug.cgi?id=111662
     5        <rdar://problem/13355808>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Instead of setNeedsDisplay()ing the whole page overlay layer every time through
     10        TCADA::flushLayers, do it at scroll time instead. Repainting on scroll is
     11        necessary to keep things painted in the right place when we scroll (the overlay
     12        is fixed to the size of the view), but is quite wasteful in apps that don’t scroll.
     13
     14        This works with threaded scrolling because overlay installation forces us
     15        into main-thread scrolling mode.
     16
     17        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
     18        (WebKit::TiledCoreAnimationDrawingArea::scroll):
     19        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
     20
    1212013-03-06  Tim Horton  <timothy_horton@apple.com>
    222
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm

    r145037 r145039  
    111111void TiledCoreAnimationDrawingArea::scroll(const IntRect& scrollRect, const IntSize& scrollDelta)
    112112{
     113    m_pageOverlayLayer->setNeedsDisplay();
    113114}
    114115
     
    308309
    309310    if (m_pageOverlayLayer) {
    310         m_pageOverlayLayer->setNeedsDisplay();
    311311        if (TiledBacking* overlayTiledBacking = m_pageOverlayLayer->tiledBacking())
    312312            overlayTiledBacking->setVisibleRect(enclosingIntRect(m_rootLayer.get().frame));
Note: See TracChangeset for help on using the changeset viewer.