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

Commit b933d7c4 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5958429 from 61bbf23c to qt-qpr2-release

Change-Id: I350eded39b433147afe512a791305c0580089d17
parents 036ea779 61bbf23c
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -422,9 +422,11 @@ TEST_F(InputSurfacesTest, input_ignores_transparent_region) {
    surface->expectTap(1, 1);
}

// Ensure we send the input to the right surface when the surface visibility changes due to the
// first buffer being submitted. ref: b/120839715
TEST_F(InputSurfacesTest, input_respects_buffer_layer_buffer) {
// TODO(b/139494112) update tests once we define expected behavior
// Ensure we still send input to the surface regardless of surface visibility changes due to the
// first buffer being submitted or alpha changes.
// Original bug ref: b/120839715
TEST_F(InputSurfacesTest, input_ignores_buffer_layer_buffer) {
    std::unique_ptr<InputSurface> bgSurface = makeSurface(100, 100);
    std::unique_ptr<InputSurface> bufferSurface =
            InputSurface::makeBufferInputSurface(mComposerClient, 100, 100);
@@ -433,14 +435,14 @@ TEST_F(InputSurfacesTest, input_respects_buffer_layer_buffer) {
    bufferSurface->showAt(10, 10);

    injectTap(11, 11);
    bgSurface->expectTap(1, 1);
    bufferSurface->expectTap(1, 1);

    postBuffer(bufferSurface->mSurfaceControl);
    injectTap(11, 11);
    bufferSurface->expectTap(1, 1);
}

TEST_F(InputSurfacesTest, input_respects_buffer_layer_alpha) {
TEST_F(InputSurfacesTest, input_ignores_buffer_layer_alpha) {
    std::unique_ptr<InputSurface> bgSurface = makeSurface(100, 100);
    std::unique_ptr<InputSurface> bufferSurface =
            InputSurface::makeBufferInputSurface(mComposerClient, 100, 100);
@@ -455,10 +457,10 @@ TEST_F(InputSurfacesTest, input_respects_buffer_layer_alpha) {
    bufferSurface->doTransaction([](auto &t, auto &sc) { t.setAlpha(sc, 0.0); });

    injectTap(11, 11);
    bgSurface->expectTap(1, 1);
    bufferSurface->expectTap(1, 1);
}

TEST_F(InputSurfacesTest, input_respects_color_layer_alpha) {
TEST_F(InputSurfacesTest, input_ignores_color_layer_alpha) {
    std::unique_ptr<InputSurface> bgSurface = makeSurface(100, 100);
    std::unique_ptr<InputSurface> fgSurface = makeSurface(100, 100);

@@ -471,7 +473,7 @@ TEST_F(InputSurfacesTest, input_respects_color_layer_alpha) {
    fgSurface->doTransaction([](auto &t, auto &sc) { t.setAlpha(sc, 0.0); });

    injectTap(11, 11);
    bgSurface->expectTap(1, 1);
    fgSurface->expectTap(1, 1);
}

TEST_F(InputSurfacesTest, input_respects_container_layer_visiblity) {
+0 −4
Original line number Diff line number Diff line
@@ -35,11 +35,7 @@ bool ContainerLayer::isVisible() const {
    return false;
}

bool ContainerLayer::canReceiveInput() const {
    return !isHiddenByPolicy();
}

void ContainerLayer::setPerFrameData(const sp<const DisplayDevice>&, const ui::Transform&,
                                     const Rect&, int32_t, const ui::Dataspace) {}

} // namespace android
+0 −2
Original line number Diff line number Diff line
@@ -31,8 +31,6 @@ public:
    const char* getTypeId() const override { return "ContainerLayer"; }
    bool isVisible() const override;

    bool canReceiveInput() const override;

    void setPerFrameData(const sp<const DisplayDevice>& display, const ui::Transform& transform,
                         const Rect& viewport, int32_t supportedPerFrameMetadata,
                         const ui::Dataspace targetDataspace) override;
+1 −1
Original line number Diff line number Diff line
@@ -2129,7 +2129,7 @@ std::shared_ptr<compositionengine::Layer> Layer::getCompositionLayer() const {
}

bool Layer::canReceiveInput() const {
    return isVisible();
    return !isHiddenByPolicy();
}

compositionengine::OutputLayer* Layer::findOutputLayerForDisplay(