compositor: Update buffer transform exclusively 72/320172/1
authorSeunghun Lee <shiin.lee@samsung.com>
Tue, 25 Feb 2025 01:11:34 +0000 (10:11 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Tue, 25 Feb 2025 02:19:54 +0000 (11:19 +0900)
The buffer transform must not be updated by both wl_surface protocol and
viewporter API at the same time. It has to be handled exclusively.

Change-Id: I89ef435298c9d5020a3df8786c6c2e2c9da283c3

src/bin/server/e_compositor.c

index d6d7c3286b66b87e78a9055978e7ba745ad98236..ed3259e0e016cc7ffc65476cdb1f26307dead50c 100644 (file)
@@ -1138,6 +1138,13 @@ _e_surface_pending_buffer_transform_update(E_Surface *surface)
 {
    int32_t transform = surface->ds_surface->current.transform;
 
+   if (surface->viewporter.acquired)
+     {
+        ELOGF("SURFACE", "Cannot update buffer transform(%d), viewporter has been acquired.",
+              surface->ec, transform);
+        return;
+     }
+
    surface->base.pending.buffer_viewport.buffer.transform = transform;
    surface->base.pending.buffer_viewport.changed = 1;
 }