New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 819414 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
no longer active
Closed: Mar 2018
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Allow ui::Layer to dictate content stretching for cc::SurfaceLayer.

Project Member Reported by apaci...@chromium.org, Mar 6 2018

Issue description

This change will allow ui::Layer dictate whether the SurfaceLayer should stretch (or shrink) its contents to fill the bounds. By default, SurfaceLayer does not stretch the contents.

For Picture-in-Picture, we'd like to be able to scale the video shown in the PiP window to fit into the window bounds. The PiP surface embedder (OverlaySurfaceEmbedder) utilizes a ui::Layer, so this would expose that ability to customize the cc::SurfaceLayer to allow that behavior.
 
Description: Show this description
Project Member

Comment 2 by bugdroid1@chromium.org, Mar 15 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ea38ede3b18e99aff19e5e17c664850b1958a09f

commit ea38ede3b18e99aff19e5e17c664850b1958a09f
Author: Jennifer Apacible <apacible@chromium.org>
Date: Thu Mar 15 02:41:55 2018

[cc::SurfaceLayer] Allow cc::SurfaceLayer to stretch content via ui::Layer.

ui::Layer has a cc::SurfaceLayer and can set its primary surface. This
change allows ui::Layer to also set whether or not cc::SurfaceLayer
should stretch its content to fill the surface bounds, which will either
stretch or shrink to fit the surface.

This change is driven by the intent for Picture-in-Picture to be able
to scale the video (contents) to fit into the PiP window bounds.
Since the PiP surface embedder, or OverlaySurfaceEmbedder, utilizes a
ui::Layer, this change would allow the ability to customize the
cc::SurfaceLayer be exposed. Further work for the PiP sizing will be
done, including maintaining the aspect ratio.

BUG:  819414   726621 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I3bdbf54635702414a4007912271118a57733ad05
Reviewed-on: https://chromium-review.googlesource.com/952476
Commit-Queue: apacible <apacible@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543289}
[modify] https://crrev.com/ea38ede3b18e99aff19e5e17c664850b1958a09f/cc/layers/surface_layer.h
[modify] https://crrev.com/ea38ede3b18e99aff19e5e17c664850b1958a09f/chrome/browser/overlay/overlay_surface_embedder.cc
[modify] https://crrev.com/ea38ede3b18e99aff19e5e17c664850b1958a09f/content/browser/renderer_host/delegated_frame_host.cc
[modify] https://crrev.com/ea38ede3b18e99aff19e5e17c664850b1958a09f/ui/aura/local/window_port_local.cc
[modify] https://crrev.com/ea38ede3b18e99aff19e5e17c664850b1958a09f/ui/aura/mus/client_surface_embedder.cc
[modify] https://crrev.com/ea38ede3b18e99aff19e5e17c664850b1958a09f/ui/aura/mus/window_port_mus.cc
[modify] https://crrev.com/ea38ede3b18e99aff19e5e17c664850b1958a09f/ui/compositor/layer.cc
[modify] https://crrev.com/ea38ede3b18e99aff19e5e17c664850b1958a09f/ui/compositor/layer.h
[modify] https://crrev.com/ea38ede3b18e99aff19e5e17c664850b1958a09f/ui/compositor/layer_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment