Changeset 84856 in webkit


Ignore:
Timestamp:
Apr 25, 2011 5:24:54 PM (13 years ago)
Author:
cmarrin@apple.com
Message:

2011-04-25 Chris Marrin <cmarrin@apple.com>

Reviewed by Simon Fraser.

REGRESSION(75137): directly composited images are double-drawn sometimes
https://bugs.webkit.org/show_bug.cgi?id=58632

Depending on the order of operations (layout, creating compositing
layers and creating simple image layers) a layer can have both image
content and have m_drawsContent=true. In this case 2 copies of the image
are drawn in the layer. If the image has alpha, it looks wrong.

I added an updateDrawsContent() call after setting the image contents
to make sure it's correct.

I couldn't create a test case that shows the problem because layerTreeAsText()
doesn't emit enough info to show this level of detail. I've opened
https://bugs.webkit.org/show_bug.cgi?id=59352 to fix that.

  • rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateImageContents):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r84854 r84856  
     12011-04-25  Chris Marrin  <cmarrin@apple.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        REGRESSION(75137): directly composited images are double-drawn sometimes
     6        https://bugs.webkit.org/show_bug.cgi?id=58632
     7
     8        Depending on the order of operations (layout, creating compositing
     9        layers and creating simple image layers) a layer can have both image
     10        content and have m_drawsContent=true. In this case 2 copies of the image
     11        are drawn in the layer. If the image has alpha, it looks wrong.
     12
     13        I added an updateDrawsContent() call after setting the image contents
     14        to make sure it's correct.
     15
     16        I couldn't create a test case that shows the problem because layerTreeAsText()
     17        doesn't emit enough info to show this level of detail. I've opened
     18        https://bugs.webkit.org/show_bug.cgi?id=59352 to fix that.
     19
     20        * rendering/RenderLayerBacking.cpp:
     21        (WebCore::RenderLayerBacking::updateImageContents):
     22
    1232011-04-25  Kenneth Russell  <kbr@google.com>
    224
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r84104 r84856  
    968968    // This is a no-op if the layer doesn't have an inner layer for the image.
    969969    m_graphicsLayer->setContentsToImage(image);
     970    updateDrawsContent();
    970971   
    971972    // Image animation is "lazy", in that it automatically stops unless someone is drawing
Note: See TracChangeset for help on using the changeset viewer.