am c570ee21: am 41a894ad: am 75597105: Merge "SurfaceTextureClient: Add ISurfaceTexture getter." into honeycomb-mr1
* commit 'c570ee21e2c2b9802c9d1f58dba024e884b225e6': SurfaceTextureClient: Add ISurfaceTexture getter.
This commit is contained in:
commit
3f13cf1be5
@ -33,6 +33,8 @@ class SurfaceTextureClient
|
|||||||
public:
|
public:
|
||||||
SurfaceTextureClient(const sp<ISurfaceTexture>& surfaceTexture);
|
SurfaceTextureClient(const sp<ISurfaceTexture>& surfaceTexture);
|
||||||
|
|
||||||
|
sp<ISurfaceTexture> getISurfaceTexture() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// can't be copied
|
// can't be copied
|
||||||
|
@ -40,6 +40,10 @@ SurfaceTextureClient::SurfaceTextureClient(
|
|||||||
mAllocator = mSurfaceTexture->getAllocator();
|
mAllocator = mSurfaceTexture->getAllocator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sp<ISurfaceTexture> SurfaceTextureClient::getISurfaceTexture() const {
|
||||||
|
return mSurfaceTexture;
|
||||||
|
}
|
||||||
|
|
||||||
int SurfaceTextureClient::setSwapInterval(ANativeWindow* window, int interval) {
|
int SurfaceTextureClient::setSwapInterval(ANativeWindow* window, int interval) {
|
||||||
SurfaceTextureClient* c = getSelf(window);
|
SurfaceTextureClient* c = getSelf(window);
|
||||||
return c->setSwapInterval(interval);
|
return c->setSwapInterval(interval);
|
||||||
|
@ -35,6 +35,11 @@ protected:
|
|||||||
sp<SurfaceTextureClient> mSTC;
|
sp<SurfaceTextureClient> mSTC;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
TEST_F(SurfaceTextureClientTest, GetISurfaceTextureIsNotNull) {
|
||||||
|
sp<ISurfaceTexture> ist(mSTC->getISurfaceTexture());
|
||||||
|
ASSERT_TRUE(ist != NULL);
|
||||||
|
}
|
||||||
|
|
||||||
TEST_F(SurfaceTextureClientTest, QueuesToWindowCompositorIsFalse) {
|
TEST_F(SurfaceTextureClientTest, QueuesToWindowCompositorIsFalse) {
|
||||||
sp<ANativeWindow> anw(mSTC);
|
sp<ANativeWindow> anw(mSTC);
|
||||||
int result = -123;
|
int result = -123;
|
||||||
|
Loading…
Reference in New Issue
Block a user