commit | 4b7c5cb8e2042b6d21f36b11d7e7263c1f12789c | [log] [tgz] |
---|---|---|
author | River Gilhuly <[email protected]> | Thu Dec 01 16:27:25 2022 |
committer | Chromium LUCI CQ <[email protected]> | Thu Dec 01 16:27:25 2022 |
tree | d69acce7077b4173af5760bbf206a21f16573785 | |
parent | fadda06c06530228ccd2da769ee2086d664123f9 [diff] [blame] |
[lacros] Add set_transform protocol to SurfaceAugmenter Add a wayland protocol to set the transform of a subsurface as a 2d affine transformation matrix. In a future patch this will be used to delegate 2d non axis-aligned quads, permitting full delegated compositing to be used in these cases. Subsurface transformation design doc: https://docs.google.com/document/d/1rfwkx0u281iMCS45KAl3j9BcdUc3HshBpbb8aDS0my8 Bug: 1345254 Change-Id: I043e929591adabcb57c076f73600c258b176caa0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4031025 Commit-Queue: River Gilhuly <[email protected]> Reviewed-by: Mitsuru Oshima <[email protected]> Reviewed-by: Kramer Ge <[email protected]> Cr-Commit-Position: refs/heads/main@{#1078104}
diff --git a/components/exo/sub_surface.cc b/components/exo/sub_surface.cc index 1c765cf..80e744a 100644 --- a/components/exo/sub_surface.cc +++ b/components/exo/sub_surface.cc
@@ -59,6 +59,16 @@ surface_->SetClipRect(clip_rect); } +void SubSurface::SetTransform(const gfx::Transform& transform) { + TRACE_EVENT1("exo", "SubSurface::SetTransform", "transform", + transform.ToString()); + + if (!parent_ || !surface_) + return; + + surface_->SetSurfaceTransform(transform); +} + void SubSurface::PlaceAbove(Surface* reference) { TRACE_EVENT1("exo", "SubSurface::PlaceAbove", "reference", reference->AsTracedValue());