Commit dc3ac2e9 authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

[BlinkGenPropertyTrees] Initiailize double_sided of synthetic effect

Previously synthetic effects always had double_sided==false, causing
the layer disappear when the backface was facing forward.

Bug: 928190
Change-Id: I35534b40346d5c5918bc99c00a4ca6b4e3b68796
Reviewed-on: https://chromium-review.googlesource.com/c/1475815Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#632764}
parent 7f38fbd8
...@@ -650,8 +650,9 @@ SkBlendMode PropertyTreeManager::SynthesizeCcEffectsForClipsIfNeeded( ...@@ -650,8 +650,9 @@ SkBlendMode PropertyTreeManager::SynthesizeCcEffectsForClipsIfNeeded(
synthetic_effect.clip_id = synthetic_effect.clip_id =
EnsureCompositorClipNode(*pending_clip.clip->Parent()); EnsureCompositorClipNode(*pending_clip.clip->Parent());
} }
synthetic_effect.transform_id = const auto& transform = pending_clip.clip->LocalTransformSpace();
EnsureCompositorTransformNode(pending_clip.clip->LocalTransformSpace()); synthetic_effect.transform_id = EnsureCompositorTransformNode(transform);
synthetic_effect.double_sided = !transform.IsBackfaceHidden();
synthetic_effect.has_render_surface = true; synthetic_effect.has_render_surface = true;
// Clip and kDstIn do not commute. This shall never be reached because // Clip and kDstIn do not commute. This shall never be reached because
// kDstIn is only used internally to implement CSS clip-path and mask, // kDstIn is only used internally to implement CSS clip-path and mask,
......
<!DOCTYPE html>
<div style="width: 100px; height: 100px; background: green"></div>
<!DOCTYPE html>
<title>CSS Test (Transforms): composited under rotateY(180deg) with overflow clip under perspective</title>
<link rel="help" href="http://www.w3.org/TR/css-transforms-2">
<meta name="assert" content="This tests that a composited element with default
backface-visibility is visible under rotateY(180deg) with overflow clip under
perspective.">
<link rel="match" href="composited-under-rotateY-180deg-clip-perspective-ref.html">
<div style="perspective: 1px">
<div style="transform: rotateY(180deg); overflow: hidden; width: 100px">
<div style="width: 100px; height: 100px; background: green; will-change: transform"></div>
</div>
<div style="transform: rotateY(180deg); overflow: hidden; width: 100px; backface-visibility: hidden">
<div style="width: 100px; height: 100px; background: green; will-change: transform"></div>
</div>
</div>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment