Changeset 178002 in webkit


Ignore:
Timestamp:
Jan 6, 2015, 4:08:36 PM (10 years ago)
Author:
Simon Fraser
Message:

Some composting reflections tests are broken
https://bugs.webkit.org/show_bug.cgi?id=139889

Reviewed by Tim Horton.

Source/WebCore:

When creating layer clones for reflections, we'd clobber the layer background
color via resetting the custom appearance on the clone. Fix by having
PlatformCALayerMac::updateCustomAppearance() only do work when the appearance changes.

Some other drive-by nullptr changes, and include layer IDs in debug layer names.

Covered by existing pixel tests.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::setName):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):

  • platform/graphics/ca/mac/PlatformCALayerMac.mm:

(PlatformCALayerMac::updateCustomAppearance):
(PlatformCALayerMac::tiledBacking):

LayoutTests:

New image baselines.

  • platform/mac/compositing/reflections/animation-inside-reflection-expected.png:
  • platform/mac/compositing/reflections/compositing-change-inside-reflection-expected.png:
  • platform/mac/compositing/reflections/masked-reflection-on-composited-expected.png:
  • platform/mac/compositing/reflections/reflection-opacity-expected.png:
  • platform/mac/compositing/reflections/transform-inside-reflection-expected.png:
Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r177999 r178002  
     12015-01-06  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Some composting reflections tests are broken
     4        https://bugs.webkit.org/show_bug.cgi?id=139889
     5
     6        Reviewed by Tim Horton.
     7       
     8        New image baselines.
     9
     10        * platform/mac/compositing/reflections/animation-inside-reflection-expected.png:
     11        * platform/mac/compositing/reflections/compositing-change-inside-reflection-expected.png:
     12        * platform/mac/compositing/reflections/masked-reflection-on-composited-expected.png:
     13        * platform/mac/compositing/reflections/reflection-opacity-expected.png:
     14        * platform/mac/compositing/reflections/transform-inside-reflection-expected.png:
     15
    1162015-01-06  Simon Fraser  <simon.fraser@apple.com>
    217
  • trunk/Source/WebCore/ChangeLog

    r177996 r178002  
     12015-01-06  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Some composting reflections tests are broken
     4        https://bugs.webkit.org/show_bug.cgi?id=139889
     5
     6        Reviewed by Tim Horton.
     7       
     8        When creating layer clones for reflections, we'd clobber the layer background
     9        color via resetting the custom appearance on the clone. Fix by having
     10        PlatformCALayerMac::updateCustomAppearance() only do work when the appearance changes.
     11       
     12        Some other drive-by nullptr changes, and include layer IDs in debug layer names.
     13
     14        Covered by existing pixel tests.
     15
     16        * platform/graphics/ca/GraphicsLayerCA.cpp:
     17        (WebCore::GraphicsLayerCA::setName):
     18        (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
     19        * platform/graphics/ca/mac/PlatformCALayerMac.mm:
     20        (PlatformCALayerMac::updateCustomAppearance):
     21        (PlatformCALayerMac::tiledBacking):
     22
    1232015-01-04  Sam Weinig  <sam@webkit.org>
    224
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

    r177324 r178002  
    389389        caLayerDescription = String::format("CALayer(%p) ", m_layer->platformLayer());
    390390
    391     String longName = caLayerDescription + String::format("GraphicsLayer(%p) ", this) + name;
     391    String longName = caLayerDescription + String::format("GraphicsLayer(%p, %llu) ", this, primaryLayerID()) + name;
    392392    GraphicsLayer::setName(longName);
    393393    noteLayerPropertyChanged(NameChanged);
     
    31443144
    31453145#ifndef NDEBUG
    3146     String name = String::format("%sCALayer(%p) GraphicsLayer(%p) ", (m_layer->layerType() == PlatformCALayer::LayerTypeWebTiledLayer) ? "Tiled " : "", m_layer->platformLayer(), this) + m_name;
     3146    String name = String::format("%sCALayer(%p) GraphicsLayer(%p, %llu) ", (m_layer->layerType() == PlatformCALayer::LayerTypeWebTiledLayer) ? "Tiled " : "", m_layer->platformLayer(), this, primaryLayerID()) + m_name;
    31473147    m_layer->setName(name);
    31483148#endif
     
    31863186{
    31873187    if (!sourceLayer)
    3188         return 0;
     3188        return nullptr;
    31893189
    31903190    RefPtr<PlatformCALayer> resultLayer;
  • trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm

    r177214 r178002  
    857857void PlatformCALayerMac::updateCustomAppearance(GraphicsLayer::CustomAppearance appearance)
    858858{
     859    if (m_customAppearance == appearance)
     860        return;
     861
    859862    m_customAppearance = appearance;
    860863
     
    891894{
    892895    if (!usesTiledBackingLayer())
    893         return 0;
     896        return nullptr;
    894897
    895898    WebTiledBackingLayer *tiledBackingLayer = static_cast<WebTiledBackingLayer *>(m_layer.get());
Note: See TracChangeset for help on using the changeset viewer.