summaryrefslogtreecommitdiff
path: root/libs/gui/SurfaceTextureClient.cpp
diff options
context:
space:
mode:
author Mathias Agopian <mathias@google.com> 2011-04-20 14:20:59 -0700
committer Mathias Agopian <mathias@google.com> 2011-05-11 18:01:51 -0700
commiteafabcdc1639fb96062d9e3c39b0ae27b0238ae1 (patch)
tree03844748fb2b1811004e86767822d9b93fad27a0 /libs/gui/SurfaceTextureClient.cpp
parentc04f153353cdb0d291297d10452239f791d3fd2b (diff)
unify SurfaceTexture and Surface
Change-Id: I49da2f5d8408e4cd7e148cfb777bb4ff68cd8f37
Diffstat (limited to 'libs/gui/SurfaceTextureClient.cpp')
-rw-r--r--libs/gui/SurfaceTextureClient.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/libs/gui/SurfaceTextureClient.cpp b/libs/gui/SurfaceTextureClient.cpp
index a46a1901ec..f3ce44b530 100644
--- a/libs/gui/SurfaceTextureClient.cpp
+++ b/libs/gui/SurfaceTextureClient.cpp
@@ -159,29 +159,17 @@ int SurfaceTextureClient::queueBuffer(android_native_buffer_t* buffer) {
int SurfaceTextureClient::query(int what, int* value) const {
LOGV("SurfaceTextureClient::query");
- Mutex::Autolock lock(mMutex);
switch (what) {
- case NATIVE_WINDOW_WIDTH:
- *value = mQueryWidth ? mQueryWidth : mReqWidth;
- return NO_ERROR;
- case NATIVE_WINDOW_HEIGHT:
- *value = mQueryHeight ? mQueryHeight : mReqHeight;
- return NO_ERROR;
- case NATIVE_WINDOW_FORMAT:
- *value = mQueryFormat ? mQueryFormat : mReqFormat;
- return NO_ERROR;
- case NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS:
- *value = MIN_UNDEQUEUED_BUFFERS;
- return NO_ERROR;
case NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER:
- // SurfaceTextureClient currently never queues frames to SurfaceFlinger.
+ // TODO: this is not needed anymore
*value = 0;
return NO_ERROR;
case NATIVE_WINDOW_CONCRETE_TYPE:
+ // TODO: this is not needed anymore
*value = NATIVE_WINDOW_SURFACE_TEXTURE_CLIENT;
return NO_ERROR;
}
- return BAD_VALUE;
+ return mSurfaceTexture->query(what, value);
}
int SurfaceTextureClient::perform(int operation, va_list args)