Merge "SurfaceTextureClient: Add ISurfaceTexture getter." into honeycomb-mr1
This commit is contained in:
commit
f9a20d77fa
@ -33,6 +33,8 @@ class SurfaceTextureClient
|
||||
public:
|
||||
SurfaceTextureClient(const sp<ISurfaceTexture>& surfaceTexture);
|
||||
|
||||
sp<ISurfaceTexture> getISurfaceTexture() const;
|
||||
|
||||
private:
|
||||
|
||||
// can't be copied
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user