|
|
Created:
6 years, 9 months ago by Stephen Chennney Modified:
6 years, 9 months ago Reviewers:
Stephen White CC:
blink-reviews, bemjb+rendering_chromium.org, dsinclair, zoltan1, eae+blinkwatch, leviw+renderwatch, blink-layers+watch_chromium.org, jchaffraix+rendering, pdr., rune+blink, Rik, mitica Base URL:
svn://svn.chromium.org/blink/trunk Visibility:
Public. |
DescriptionDon't access compositing state for blending in RenderLayer add/remove child
Code to update the blending status in the RenderLayer hierarchy when a child is added or removed current invokes paintsWithBlendMode which calls compositingState() when it should not. This patch removes the compositing state check in this case, which means we may do more work.
All existing tests pass.
R=senorblanco@chromium.org
BUG=343759
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170220
Patch Set 1 : Removed comments #Patch Set 2 : Removed additional case #
Total comments: 2
Messages
Total messages: 21 (0 generated)
Adobe folks, could you take a look and comment on how sensible this is. We need to remove the check on compositing state during layout (which is accessing potentially invalid state anyway). This approach is the most direct but I am unsure of the consequences. Senorblanco, I'm adding you as reviewer but please no commit until we have feedback from the people who implemented this.
On 2014/03/25 16:06:29, Stephen Chenney wrote: > Adobe folks, could you take a look and comment on how sensible this is. We need > to remove the check on compositing state during layout (which is accessing > potentially invalid state anyway). This approach is the most direct but I am > unsure of the consequences. > > Senorblanco, I'm adding you as reviewer but please no commit until we have > feedback from the people who implemented this. Could you please add rosca@adobe in CC? He did work in this area, I guess he could help on this issue.
+rosca
On 2014/03/25 16:45:50, Stephen Chenney wrote: > +rosca I think we should remove paintsWithBlendMode from RenderLayer::updateDescendantDependentFlags as well. It should be ok with these changes, because we need blending flags up to date in RenderLayerBlendInfo regardless of the compositor state. The compositingState is required only in order to avoid creating new transparencyLayers and to avoid using blending operators on layers that have their own backings.
LGTM (but I won't commit).
More compositing checks removed. I wonder why the assertion code never asserted on those. Anyway, all tests pass but I have a question ont he logic around stacking context. https://codereview.chromium.org/211103007/diff/110001/Source/core/rendering/R... File Source/core/rendering/RenderLayer.cpp (left): https://codereview.chromium.org/211103007/diff/110001/Source/core/rendering/R... Source/core/rendering/RenderLayer.cpp:862: || (childLayerHasBlendMode && !child->stackingNode()->isStackingContext()); Note that this logic is broken, and I believe I have modified it to have the same effect without the confusion. In particular, the && clause involving stacking context can only be true if childLayerHasBlendMode is true, but we will already set the result true because we || with that sooner. In other words, there's no way the && clause can be true without the entire expression being true anyway. It makes me wonder, however, whether this original code is a bug.
https://codereview.chromium.org/211103007/diff/110001/Source/core/rendering/R... File Source/core/rendering/RenderLayer.cpp (left): https://codereview.chromium.org/211103007/diff/110001/Source/core/rendering/R... Source/core/rendering/RenderLayer.cpp:862: || (childLayerHasBlendMode && !child->stackingNode()->isStackingContext()); On 2014/03/26 14:37:52, Stephen Chenney wrote: > Note that this logic is broken, and I believe I have modified it to have the > same effect without the confusion. > > In particular, the && clause involving stacking context can only be true if > childLayerHasBlendMode is true, but we will already set the result true because > we || with that sooner. In other words, there's no way the && clause can be true > without the entire expression being true anyway. > > It makes me wonder, however, whether this original code is a bug. I agree that your change will not change the old logic, which doesn't look to be right. I think the correct condition would be: bool childLayerHasBlendMode = child->blendInfo().hasBlendMode() || (!child->stackingNode()->isStackingContext() && child->blendInfo().childLayerHasBlendMode()); Why: we don't care if a stacking context child has blending children, we need this info only for non-stacking context children. For non-stacking context children we know that the flag is not dirty, as we call updateDescendantDependentFlags() right above. I've run the layout tests with all these changes and they pass. If you are ok with this line, you can insert it to your patch. Tell me if you want me to add this change with another review along with a test that makes sure this code is touched.
I'll commit this and, rosca, you can come on in and fix the logic and add a test.
The CQ bit was checked by schenney@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/schenney@chromium.org/211103007/110001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: tryserver.blink on linux_blink_rel
The CQ bit was checked by schenney@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/schenney@chromium.org/211103007/110001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: tryserver.blink on linux_blink_dbg
The CQ bit was checked by schenney@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/schenney@chromium.org/211103007/110001
The CQ bit was unchecked by commit-bot@chromium.org
Commit queue rejected this change because the description was changed between the time the change entered the commit queue and the time it was ready to commit. You can safely check the commit box again.
Message was sent while issue was closed.
Committed patchset #2 manually as r170220 (presubmit successful). |