Bug 42408 - Assertion when turning Accelerated Compositing off on a composited page
Summary: Assertion when turning Accelerated Compositing off on a composited page
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-15 14:33 PDT by Simon Fraser (smfr)
Modified: 2011-12-21 01:16 PST (History)
4 users (show)

See Also:


Attachments
Patch (1.72 KB, patch)
2010-07-15 14:36 PDT, Simon Fraser (smfr)
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2010-07-15 14:33:22 PDT
When turning off Accelerated Compositing, we hit one of the

    ASSERT(willBeComposited == needsToBeComposited(layer));

assertions in RenderLayerCompositor::computeCompositingRequirements().
Comment 1 Simon Fraser (smfr) 2010-07-15 14:36:03 PDT
Created attachment 61724 [details]
Patch
Comment 2 Darin Adler 2010-07-15 14:39:40 PDT
Comment on attachment 61724 [details]
Patch

Does this fix only the assertion, or does it affect behavior too? If it does have an effect on behavior, what is that effect?
Comment 3 Simon Fraser (smfr) 2010-07-15 14:58:52 PDT
There is no change in behavior; we used to do a bit of extra work for the one call to computeCompositingRequirements() after compositing was disabled, because we thought we needed to make layers, and then when we tried to, noticed that m_hasAcceleratedCompositing was false.

With the patch we never even try to make layers in that situation.
Comment 4 Simon Fraser (smfr) 2010-07-16 13:18:37 PDT
http://trac.webkit.org/changeset/63573
Comment 5 qi 2010-07-19 12:42:52 PDT
*** Bug 42582 has been marked as a duplicate of this bug. ***
Comment 6 Balazs Kelemen 2011-12-20 07:09:19 PST
I have a similar issue: https://bugs.webkit.org/show_bug.cgi?id=74511. When running fast/multicol/pagination-v-vertical-lr.html it hits the assertion in RenderLayerCompositor:

// If we just entered compositing mode, the root will have become composited (as long as accelerated compositing is enabled).
if (layer->isRootLayer()) {
    if (inCompositingMode() && m_hasAcceleratedCompositing)
        willBeComposited = true;
}
    
ASSERT(willBeComposited == needsToBeComposited(layer)); <<<<<<<<<<

In this case the layer is a root layer, and both inCompositingMode() and m_hasAcceleratedCompositing are true, but needsToBeComposited(layer) is false because layer->isNormalFlowOnly() => !layer->isSelfPaintingLayer() => !canBeComposited(layer)
Do you think another condition could be sufficient? i.e:
-if (layer->isRootLayer()) {
+if (layer->isRootLayer() && canBeComposited(layer))

Thanks in advance to your help!
Comment 7 Simon Fraser (smfr) 2011-12-20 07:21:52 PST
(In reply to comment #6)
> I have a similar issue: https://bugs.webkit.org/show_bug.cgi?id=74511. When running fast/multicol/pagination-v-vertical-lr.html it hits the assertion in RenderLayerCompositor:

Please file a new bug for this assertion.

> In this case the layer is a root layer, and both inCompositingMode() and m_hasAcceleratedCompositing are true, but needsToBeComposited(layer) is false because layer->isNormalFlowOnly() => !layer->isSelfPaintingLayer() => !canBeComposited(layer)
> Do you think another condition could be sufficient? i.e:
> -if (layer->isRootLayer()) {
> +if (layer->isRootLayer() && canBeComposited(layer))

If the root layer cannot be composited, then all kinds of stuff will break. I think we'll have to fix this another way.
Comment 8 Balazs Kelemen 2011-12-21 01:16:35 PST
(In reply to comment #7)
> (In reply to comment #6)
> > I have a similar issue: https://bugs.webkit.org/show_bug.cgi?id=74511. When running fast/multicol/pagination-v-vertical-lr.html it hits the assertion in RenderLayerCompositor:
> 
> Please file a new bug for this assertion.

Filed https://bugs.webkit.org/show_bug.cgi?id=74999.