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

Commit 05f6941e authored by Jamie Gennis's avatar Jamie Gennis Committed by Android Git Automerger
Browse files

am 41a894ad: am 75597105: Merge "SurfaceTextureClient: Add ISurfaceTexture...

am 41a894ad: am 75597105: Merge "SurfaceTextureClient: Add ISurfaceTexture getter." into honeycomb-mr1

* commit '41a894ad1379a046b0b7471a33d974c6241a91a9':
  SurfaceTextureClient: Add ISurfaceTexture getter.
parents 07294053 0a69ff89
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -33,6 +33,8 @@ class SurfaceTextureClient
public:
    SurfaceTextureClient(const sp<ISurfaceTexture>& surfaceTexture);

    sp<ISurfaceTexture> getISurfaceTexture() const;

private:

    // can't be copied
+4 −0
Original line number Diff line number Diff line
@@ -40,6 +40,10 @@ SurfaceTextureClient::SurfaceTextureClient(
    mAllocator = mSurfaceTexture->getAllocator();
}

sp<ISurfaceTexture> SurfaceTextureClient::getISurfaceTexture() const {
    return mSurfaceTexture;
}

int SurfaceTextureClient::setSwapInterval(ANativeWindow* window, int interval) {
    SurfaceTextureClient* c = getSelf(window);
    return c->setSwapInterval(interval);
+5 −0
Original line number Diff line number Diff line
@@ -35,6 +35,11 @@ protected:
    sp<SurfaceTextureClient> mSTC;
};

TEST_F(SurfaceTextureClientTest, GetISurfaceTextureIsNotNull) {
    sp<ISurfaceTexture> ist(mSTC->getISurfaceTexture());
    ASSERT_TRUE(ist != NULL);
}

TEST_F(SurfaceTextureClientTest, QueuesToWindowCompositorIsFalse) {
    sp<ANativeWindow> anw(mSTC);
    int result = -123;