Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b501e3b authored by Rob Carr's avatar Rob Carr Committed by Android (Google) Code Review
Browse files

Merge "WindowManagerService: Handle transparent region on client" into sc-dev

parents b4080f63 4fa6a5f4
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -122,14 +122,6 @@ interface IWindowSession {
     */
    boolean outOfMemory(IWindow window);

    /**
     * Give the window manager a hint of the part of the window that is
     * completely transparent, allowing it to work with the surface flinger
     * to optimize compositing of this part of the window.
     */
    @UnsupportedAppUsage
    oneway void setTransparentRegion(IWindow window, in Region region);

    /**
     * Tell the window manager about the content and visible insets of the
     * given window, which can be used to adjust the <var>outContentInsets</var>
+8 −5
Original line number Diff line number Diff line
@@ -3064,11 +3064,14 @@ public final class ViewRootImpl implements ViewParent,
                if (!mTransparentRegion.equals(mPreviousTransparentRegion)) {
                    mPreviousTransparentRegion.set(mTransparentRegion);
                    mFullRedrawNeeded = true;
                    // reconfigure window manager
                    try {
                        mWindowSession.setTransparentRegion(mWindow, mTransparentRegion);
                    } catch (RemoteException e) {
                    }
                    // TODO: Ideally we would do this in prepareSurfaces,
                    // but prepareSurfaces is currently working under
                    // the assumption that we paused the render thread
                    // via the WM relayout code path. We probably eventually
                    // want to synchronize transparent region hint changes
                    // with draws.
                    mTransaction.setTransparentRegionHint(getSurfaceControl(),
                        mTransparentRegion).apply();
                }
            }

+0 −4
Original line number Diff line number Diff line
@@ -313,10 +313,6 @@ public class WindowlessWindowManager implements IWindowSession {
        return false;
    }

    @Override
    public void setTransparentRegion(android.view.IWindow window, android.graphics.Region region) {
    }

    @Override
    public void setInsets(android.view.IWindow window, int touchableInsets,
            android.graphics.Rect contentInsets, android.graphics.Rect visibleInsets,
+0 −5
Original line number Diff line number Diff line
@@ -247,11 +247,6 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient {
        return mService.outOfMemoryWindow(this, window);
    }

    @Override
    public void setTransparentRegion(IWindow window, Region region) {
        mService.setTransparentRegionWindow(this, window, region);
    }

    @Override
    public void setInsets(IWindow window, int touchableInsets,
            Rect contentInsets, Rect visibleInsets, Region touchableArea) {
+0 −17
Original line number Diff line number Diff line
@@ -2150,23 +2150,6 @@ public class WindowManagerService extends IWindowManager.Stub
        Slog.i(tag, s, e);
    }

    void setTransparentRegionWindow(Session session, IWindow client, Region region) {
        final long origId = Binder.clearCallingIdentity();
        try {
            synchronized (mGlobalLock) {
                WindowState w = windowForClientLocked(session, client, false);
                ProtoLog.i(WM_SHOW_TRANSACTIONS, "SURFACE transparentRegionHint=%s: %s",
                        region, w);

                if ((w != null) && w.mHasSurface) {
                    w.mWinAnimator.setTransparentRegionHintLocked(region);
                }
            }
        } finally {
            Binder.restoreCallingIdentity(origId);
        }
    }

    void setInsetsWindow(Session session, IWindow client, int touchableInsets, Rect contentInsets,
            Rect visibleInsets, Region touchableRegion) {
        int uid = Binder.getCallingUid();
Loading