Commit 1c73336a authored by enne's avatar enne Committed by Commit Bot

Revert "Adjust rounded corner bounds when aggregating quads into a new target state."

This reverts commit 88b589af.

Reason for revert: causes issue 960436

This seems worse than the original issue, so reverting now while chrishtr is out.

Original change's description:
> Adjust rounded corner bounds when aggregating quads into a new target state.
> 
> The rounded_corner_bounds field of SharedQuadState needs to be in the
> space of the target render surface. When changing that target, therefore,
> rounded_corner_bounds needs to be updated accordingly.
> 
> Bug: 947715
> 
> Change-Id: I83b3f773d960e82d75060326c197ef12ae1755fc
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1590900
> Reviewed-by: enne <enne@chromium.org>
> Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#656424}

TBR=chrishtr@chromium.org,enne@chromium.org,sammiequon@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 947715,960436
Change-Id: I68dbe7679ce90d0de6be4ef1a3958d3ec8f94a89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1600435Reviewed-by: default avatarenne <enne@chromium.org>
Commit-Queue: enne <enne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#657541}
parent c315af26
...@@ -140,9 +140,6 @@ void EffectNode::AsValueInto(base::trace_event::TracedValue* value) const { ...@@ -140,9 +140,6 @@ void EffectNode::AsValueInto(base::trace_event::TracedValue* value) const {
value->SetDouble("opacity", opacity); value->SetDouble("opacity", opacity);
value->SetDouble("backdrop_filter_quality", backdrop_filter_quality); value->SetDouble("backdrop_filter_quality", backdrop_filter_quality);
value->SetBoolean("is_fast_rounded_corner", is_fast_rounded_corner); value->SetBoolean("is_fast_rounded_corner", is_fast_rounded_corner);
if (is_fast_rounded_corner)
MathUtil::AddToTracedValue("rounded_corner_bounds", rounded_corner_bounds,
value);
value->SetString("blend_mode", SkBlendMode_Name(blend_mode)); value->SetString("blend_mode", SkBlendMode_Name(blend_mode));
value->SetBoolean("cache_render_surface", cache_render_surface); value->SetBoolean("cache_render_surface", cache_render_surface);
value->SetBoolean("has_copy_request", has_copy_request); value->SetBoolean("has_copy_request", has_copy_request);
......
...@@ -699,18 +699,6 @@ SharedQuadState* SurfaceAggregator::CopySharedQuadState( ...@@ -699,18 +699,6 @@ SharedQuadState* SurfaceAggregator::CopySharedQuadState(
occluding_damage_rect_valid); occluding_damage_rect_valid);
} }
gfx::RRectF MapRoundedBounds(const gfx::RRectF& old_bounds,
const gfx::Transform& transform) {
if (old_bounds.IsEmpty())
return old_bounds;
DCHECK(transform.Preserves2dAxisAlignment());
gfx::RRectF bounds(old_bounds);
SkMatrix matrix = transform.matrix();
bounds.Scale(matrix.getScaleX(), matrix.getScaleY());
bounds.Offset(transform.To2dTranslation());
return bounds;
}
SharedQuadState* SurfaceAggregator::CopyAndScaleSharedQuadState( SharedQuadState* SurfaceAggregator::CopyAndScaleSharedQuadState(
const SharedQuadState* source_sqs, const SharedQuadState* source_sqs,
const gfx::Transform& scaled_quad_to_target_transform, const gfx::Transform& scaled_quad_to_target_transform,
...@@ -737,14 +725,9 @@ SharedQuadState* SurfaceAggregator::CopyAndScaleSharedQuadState( ...@@ -737,14 +725,9 @@ SharedQuadState* SurfaceAggregator::CopyAndScaleSharedQuadState(
gfx::Transform new_transform = scaled_quad_to_target_transform; gfx::Transform new_transform = scaled_quad_to_target_transform;
new_transform.ConcatTransform(target_transform); new_transform.ConcatTransform(target_transform);
// The rounded corner bounds need to be in the space of the target. Since
// the target may have changed, apply the extra transform to the new target.
gfx::RRectF new_bounds =
MapRoundedBounds(*rounded_corner_info.bounds, target_transform);
shared_quad_state->SetAll( shared_quad_state->SetAll(
new_transform, quad_layer_rect, visible_quad_layer_rect, new_bounds, new_transform, quad_layer_rect, visible_quad_layer_rect,
new_clip_rect.rect, new_clip_rect.is_clipped, *rounded_corner_info.bounds, new_clip_rect.rect, new_clip_rect.is_clipped,
source_sqs->are_contents_opaque, source_sqs->opacity, source_sqs->are_contents_opaque, source_sqs->opacity,
source_sqs->blend_mode, source_sqs->sorting_context_id); source_sqs->blend_mode, source_sqs->sorting_context_id);
shared_quad_state->is_fast_rounded_corner = shared_quad_state->is_fast_rounded_corner =
......
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