Changeset 183894 in webkit


Ignore:
Timestamp:
May 6, 2015 3:46:01 PM (9 years ago)
Author:
dino@apple.com
Message:

Handle backdrop views that have to tile
https://bugs.webkit.org/show_bug.cgi?id=142317
<rdar://problem/20049088>

Reviewed by Simon Fraser.

Source/WebCore:

Make sure backdrop layers don't tile. If they are big
enough, we'll leave it to the platform compositor to handle.

This also fixes a bug where if a layer changed from a backdrop
type to a tiled type, it would still retain its custom appearance
and we'd try to add children to the wrong layer.

Test: compositing/media-controls-bar-appearance-big.html

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Check if
a layer needs a backdrop before checking if it needs to tile.

Source/WebKit2:

Add some better logging for custom appearance.

  • Shared/mac/RemoteLayerTreeTransaction.mm:

(WebKit::RemoteLayerTreeTextStream::operator<<):

LayoutTests:

A test that creates some backdrop views, then makes them
big enough that it would trigger tiling (which we don't want
to happen).

  • compositing/media-controls-bar-appearance-big-expected.txt: Added.
  • compositing/media-controls-bar-appearance-big.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r183878 r183894  
     12015-05-06  Dean Jackson  <dino@apple.com>
     2
     3        Handle backdrop views that have to tile
     4        https://bugs.webkit.org/show_bug.cgi?id=142317
     5        <rdar://problem/20049088>
     6
     7        Reviewed by Simon Fraser.
     8
     9        A test that creates some backdrop views, then makes them
     10        big enough that it would trigger tiling (which we don't want
     11        to happen).
     12
     13        * compositing/media-controls-bar-appearance-big-expected.txt: Added.
     14        * compositing/media-controls-bar-appearance-big.html: Added.
     15
    1162015-05-06  Martin Robinson  <mrobinson@igalia.com>
    217
  • trunk/Source/WebCore/ChangeLog

    r183892 r183894  
     12015-05-06  Dean Jackson  <dino@apple.com>
     2
     3        Handle backdrop views that have to tile
     4        https://bugs.webkit.org/show_bug.cgi?id=142317
     5        <rdar://problem/20049088>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Make sure backdrop layers don't tile. If they are big
     10        enough, we'll leave it to the platform compositor to handle.
     11
     12        This also fixes a bug where if a layer changed from a backdrop
     13        type to a tiled type, it would still retain its custom appearance
     14        and we'd try to add children to the wrong layer.
     15
     16        Test: compositing/media-controls-bar-appearance-big.html
     17
     18        * platform/graphics/ca/GraphicsLayerCA.cpp:
     19        (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Check if
     20        a layer needs a backdrop before checking if it needs to tile.
     21
    1222015-05-06  Carlos Garcia Campos  <cgarcia@igalia.com> and Per Arne Vollan  <peavo@outlook.com>
    223
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

    r183354 r183894  
    14391439    PlatformCALayer::LayerType neededLayerType = m_layer->layerType();
    14401440
    1441     if (needTiledLayer)
     1441    if (needBackdropLayerType)
     1442        neededLayerType = layerTypeForCustomBackdropAppearance(customAppearance());
     1443    else if (needTiledLayer)
    14421444        neededLayerType = PlatformCALayer::LayerTypeTiledBackingLayer;
    1443     else if (needBackdropLayerType)
    1444         neededLayerType = layerTypeForCustomBackdropAppearance(customAppearance());
    14451445    else if (isCustomBackdropLayerType(m_layer->layerType()) || m_usingTiledBacking)
    14461446        neededLayerType = PlatformCALayer::LayerTypeWebLayer;
  • trunk/Source/WebKit2/ChangeLog

    r183893 r183894  
     12015-05-06  Dean Jackson  <dino@apple.com>
     2
     3        Handle backdrop views that have to tile
     4        https://bugs.webkit.org/show_bug.cgi?id=142317
     5        <rdar://problem/20049088>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Add some better logging for custom appearance.
     10
     11        * Shared/mac/RemoteLayerTreeTransaction.mm:
     12        (WebKit::RemoteLayerTreeTextStream::operator<<):
     13
    1142015-05-06  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm

    r183242 r183894  
    667667    RemoteLayerTreeTextStream& operator<<(const PlatformCAAnimationRemote::Properties&);
    668668    RemoteLayerTreeTextStream& operator<<(const RemoteLayerBackingStore&);
     669    RemoteLayerTreeTextStream& operator<<(const WebCore::GraphicsLayer::CustomAppearance&);
    669670    RemoteLayerTreeTextStream& operator<<(BlendMode);
    670671    RemoteLayerTreeTextStream& operator<<(PlatformCAAnimation::AnimationType);
     
    834835        ts << "none";
    835836        break;
     837    }
     838    return ts;
     839}
     840
     841RemoteLayerTreeTextStream& RemoteLayerTreeTextStream::operator<<(const WebCore::GraphicsLayer::CustomAppearance& customAppearance)
     842{
     843    RemoteLayerTreeTextStream& ts = *this;
     844    switch (customAppearance) {
     845    case WebCore::GraphicsLayer::CustomAppearance::NoCustomAppearance: ts << "none"; break;
     846    case WebCore::GraphicsLayer::CustomAppearance::ScrollingOverhang: ts << "scrolling-overhang"; break;
     847    case WebCore::GraphicsLayer::CustomAppearance::ScrollingShadow: ts << "scrolling-shadow"; break;
     848    case WebCore::GraphicsLayer::CustomAppearance::LightBackdropAppearance: ts << "light-backdrop"; break;
     849    case WebCore::GraphicsLayer::CustomAppearance::DarkBackdropAppearance: ts << "dark-backdrop"; break;
    836850    }
    837851    return ts;
Note: See TracChangeset for help on using the changeset viewer.