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

Commit 03749842 authored by Chavi Weingarten's avatar Chavi Weingarten Committed by Android (Google) Code Review
Browse files

Merge "Remove crop for Windowless Window leash"

parents d62b9a23 084f9f98
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -361,7 +361,6 @@ public class WindowlessWindowManager implements IWindowSession {
        }

        t.setPosition(leash, frames.frame.left, frames.frame.top);
        t.setWindowCrop(leash, frames.frame.width(), frames.frame.height());

        if (viewFlags == View.VISIBLE) {
            // TODO(b/262892794) ViewRootImpl modifies the app's rendering SurfaceControl
+2 −0
Original line number Diff line number Diff line
@@ -250,6 +250,8 @@ void CanvasContext::setupPipelineSurface() {
        // Order is important when new and old surfaces are the same, because old surface has
        // its frame stats disabled automatically.
        native_window_enable_frame_timestamps(mNativeSurface->getNativeWindow(), true);
        native_window_set_scaling_mode(mNativeSurface->getNativeWindow(),
                                       NATIVE_WINDOW_SCALING_MODE_FREEZE);
    } else {
        mRenderThread.removeFrameCallback(this);
        mGenerationID++;
+15 −2
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import static android.server.wm.WindowManagerState.getLogicalDisplaySize;

import android.app.KeyguardManager;
import android.os.PowerManager;
import android.platform.test.annotations.Presubmit;
import android.view.SurfaceControl;
import android.view.cts.surfacevalidator.CapturedActivity;
import android.window.SurfaceSyncGroup;
@@ -68,11 +69,23 @@ public class SurfaceSyncGroupContinuousTest {

    @Test
    public void testSurfaceControlViewHostIPCSync_Fast() throws Throwable {
        mCapturedActivity.verifyTest(new SyncValidatorSCVHTestCase(0 /* delayMs */), mName);
        mCapturedActivity.verifyTest(
                new SyncValidatorSCVHTestCase(0 /* delayMs */, false /* overrideDefaultDuration */),
                mName);
    }

    @Test
    public void testSurfaceControlViewHostIPCSync_Slow() throws Throwable {
        mCapturedActivity.verifyTest(new SyncValidatorSCVHTestCase(100 /* delayMs */), mName);
        mCapturedActivity.verifyTest(new SyncValidatorSCVHTestCase(100 /* delayMs */,
                false /* overrideDefaultDuration */), mName);
    }

    @Test
    @Presubmit
    public void testSurfaceControlViewHostIPCSync_Short() throws Throwable {
        mCapturedActivity.setMinimumCaptureDurationMs(5000);
        mCapturedActivity.verifyTest(
                new SyncValidatorSCVHTestCase(0 /* delayMs */, true /* overrideDefaultDuration */),
                mName);
    }
}
+9 −2
Original line number Diff line number Diff line
@@ -54,10 +54,12 @@ public class SyncValidatorSCVHTestCase implements ISurfaceValidatorTestCase {
            new Point(300, 800), new Point(200, 200)};
    private int mLastSizeIndex = 1;

    private long mDelayMs;
    private final long mDelayMs;
    private final boolean mOverrideDefaultDuration;

    public SyncValidatorSCVHTestCase(long delayMs) {
    public SyncValidatorSCVHTestCase(long delayMs, boolean overrideDefaultDuration) {
        mDelayMs = delayMs;
        mOverrideDefaultDuration = overrideDefaultDuration;
    }

    private final Runnable mRunnable = new Runnable() {
@@ -231,4 +233,9 @@ public class SyncValidatorSCVHTestCase implements ISurfaceValidatorTestCase {
    public void end() {
        mHandler.removeCallbacks(mRunnable);
    }

    @Override
    public boolean hasAnimation() {
        return !mOverrideDefaultDuration;
    }
}