Commit e6fcba83 authored by Weiliang Chen's avatar Weiliang Chen Committed by Commit Bot

viz: Fix Rotated OOPIF Clip

Rotate OOPIF content needs a render surface to apply correct clip. Make
sure that render surface is not skipped in surface aggregator.

Test https://codepen.io/anon/pen/jZJVBY the green rect should be clipped
by iframe.

R=enne

Bug: 817999
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Ie7692840efc089534ac0430e6422cbe98d392802
Reviewed-on: https://chromium-review.googlesource.com/946633
Commit-Queue: weiliangc <weiliangc@chromium.org>
Reviewed-by: default avatarenne <enne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542004}
parent 2d86a05a
......@@ -194,7 +194,6 @@ void SurfaceAggregator::HandleSurfaceQuad(
bool* damage_rect_in_quad_space_valid) {
SurfaceId primary_surface_id = surface_quad->primary_surface_id;
Surface* primary_surface = manager_->GetSurfaceForId(primary_surface_id);
if (primary_surface && primary_surface->HasActiveFrame()) {
EmitSurfaceContent(primary_surface, parent_device_scale_factor,
surface_quad->shared_quad_state, surface_quad->rect,
......@@ -328,7 +327,10 @@ void SurfaceAggregator::EmitSurfaceContent(
const auto& child_to_parent_map =
provider_ ? provider_->GetChildToParentMap(ChildIdForSurface(surface))
: empty_map;
bool merge_pass = source_sqs->opacity == 1.f && copy_requests.empty();
gfx::Transform combined_transform = scaled_quad_to_target_transform;
combined_transform.ConcatTransform(target_transform);
bool merge_pass = source_sqs->opacity == 1.f && copy_requests.empty() &&
combined_transform.Preserves2dAxisAlignment();
const RenderPassList& referenced_passes = render_pass_list;
// TODO(fsamuel): Move this to a separate helper function.
......
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