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

Commit 272aaa38 authored by Mathias Agopian's avatar Mathias Agopian Committed by Android (Google) Code Review
Browse files

Merge "SF transactions are now O(1) wrt IPC instead of O(N)."

parents 5231b0af 439863f3
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -213,9 +213,10 @@ status_t BootAnimation::readyToRun() {
    // create the native surface
    sp<SurfaceControl> control = session()->createSurface(
            0, dinfo.w, dinfo.h, PIXEL_FORMAT_RGB_565);
    session()->openTransaction();

    SurfaceComposerClient::openGlobalTransaction();
    control->setLayer(0x40000000);
    session()->closeTransaction();
    SurfaceComposerClient::closeGlobalTransaction();

    sp<Surface> s = control->getSurface();

+2 −2
Original line number Diff line number Diff line
@@ -568,10 +568,10 @@ int main(int argc, char **argv) {
        CHECK(control != NULL);
        CHECK(control->isValid());

        CHECK_EQ(composerClient->openTransaction(), (status_t)OK);
        SurfaceComposerClient::openGlobalTransaction();
        CHECK_EQ(control->setLayer(30000), (status_t)OK);
        CHECK_EQ(control->show(), (status_t)OK);
        CHECK_EQ(composerClient->closeTransaction(), (status_t)OK);
        SurfaceComposerClient::closeGlobalTransaction();

        surface = control->getSurface();
        CHECK(surface != NULL);
+2 −2
Original line number Diff line number Diff line
@@ -865,10 +865,10 @@ int main(int argc, char **argv) {
            CHECK(control != NULL);
            CHECK(control->isValid());

            CHECK_EQ(composerClient->openTransaction(), (status_t)OK);
            SurfaceComposerClient::openGlobalTransaction();
            CHECK_EQ(control->setLayer(30000), (status_t)OK);
            CHECK_EQ(control->show(), (status_t)OK);
            CHECK_EQ(composerClient->closeTransaction(), (status_t)OK);
            SurfaceComposerClient::closeGlobalTransaction();

            gSurface = control->getSurface();
            CHECK(gSurface != NULL);
+2 −2
Original line number Diff line number Diff line
@@ -305,10 +305,10 @@ int main(int argc, char **argv) {
    CHECK(control != NULL);
    CHECK(control->isValid());

    CHECK_EQ(composerClient->openTransaction(), (status_t)OK);
    SurfaceComposerClient::openGlobalTransaction();
    CHECK_EQ(control->setLayer(30000), (status_t)OK);
    CHECK_EQ(control->show(), (status_t)OK);
    CHECK_EQ(composerClient->closeTransaction(), (status_t)OK);
    SurfaceComposerClient::closeGlobalTransaction();

    sp<Surface> surface = control->getSurface();
    CHECK(surface != NULL);
+8 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
namespace android {

class Parcel;
class ISurfaceComposerClient;

struct layer_state_t {

@@ -68,6 +69,13 @@ struct layer_state_t {
            Region          transparentRegion;
};

struct ComposerState {
    sp<ISurfaceComposerClient> client;
    layer_state_t state;
    status_t    write(Parcel& output) const;
    status_t    read(const Parcel& input);
};

}; // namespace android

#endif // ANDROID_SF_LAYER_STATE_H
Loading