Changeset 210095 in webkit


Ignore:
Timestamp:
Dec 21, 2016 7:06:35 PM (7 years ago)
Author:
timothy_horton@apple.com
Message:

TileGrid revalidates tiles twice during flush, first with wrong visible rect
https://bugs.webkit.org/show_bug.cgi?id=166406

Reviewed by Simon Fraser.

No new tests; existing tests cover this code, this is just a perf win,
specifically reducing the amount of layer churn during zooming.

  • platform/graphics/ca/TileGrid.cpp:

(WebCore::TileGrid::setScale):
Schedule a revalidation, which will happen later in the same flush,
instead of doing it immediately. Doing it immediately is problematic,
because we're currently in the middle of a GraphicsLayer tree flush,
and don't have the complete picture of the new state yet. We're guaranteed
to get the new scale *before* the flush calls revalidateTiles.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r210094 r210095  
     12016-12-21  Tim Horton  <timothy_horton@apple.com>
     2
     3        TileGrid revalidates tiles twice during flush, first with wrong visible rect
     4        https://bugs.webkit.org/show_bug.cgi?id=166406
     5
     6        Reviewed by Simon Fraser.
     7
     8        No new tests; existing tests cover this code, this is just a perf win,
     9        specifically reducing the amount of layer churn during zooming.
     10
     11        * platform/graphics/ca/TileGrid.cpp:
     12        (WebCore::TileGrid::setScale):
     13        Schedule a revalidation, which will happen later in the same flush,
     14        instead of doing it immediately. Doing it immediately is problematic,
     15        because we're currently in the middle of a GraphicsLayer tree flush,
     16        and don't have the complete picture of the new state yet. We're guaranteed
     17        to get the new scale *before* the flush calls revalidateTiles.
     18
    1192016-12-21  Tim Horton  <timothy_horton@apple.com>
    220
  • trunk/Source/WebCore/platform/graphics/ca/TileGrid.cpp

    r210094 r210095  
    7979    m_containerLayer->setTransform(transform);
    8080
    81     // FIXME: we may revalidateTiles twice in this commit.
    82     revalidateTiles(PruneSecondaryTiles);
     81    m_controller.setNeedsRevalidateTiles();
    8382
    8483    m_containerLayer.get().setContentsScale(m_controller.deviceScaleFactor());
Note: See TracChangeset for help on using the changeset viewer.