summaryrefslogtreecommitdiffstats
path: root/include/gui
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-11-10 14:34:26 -0800
committerMathias Agopian <mathias@google.com>2011-11-11 18:44:35 -0800
commitb89d88f531ee39927f8f554baaae5ecc9101ba9d (patch)
treec00601c0b328a2670e449a3afb296bd7ea30eadd /include/gui
parentc51bb4d394dd47e48abc8a6d9cbc740f821546ff (diff)
downloadframeworks_base-b89d88f531ee39927f8f554baaae5ecc9101ba9d.zip
frameworks_base-b89d88f531ee39927f8f554baaae5ecc9101ba9d.tar.gz
frameworks_base-b89d88f531ee39927f8f554baaae5ecc9101ba9d.tar.bz2
Define, document, and test the behavior of very large SurfaceTextures
updateTexImage() now throws a runtime exception when its native counterpart fails Bug: 5506633 Change-Id: I151a6f685d465966e7df4df624412ab2da62e95f
Diffstat (limited to 'include/gui')
-rw-r--r--include/gui/SurfaceTexture.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/gui/SurfaceTexture.h b/include/gui/SurfaceTexture.h
index e2d6179..d7dd4d6 100644
--- a/include/gui/SurfaceTexture.h
+++ b/include/gui/SurfaceTexture.h
@@ -79,7 +79,11 @@ public:
// pointed to by the buf argument and a status of OK is returned. If no
// slot is available then a status of -EBUSY is returned and buf is
// unmodified.
- virtual status_t dequeueBuffer(int *buf, uint32_t w, uint32_t h,
+ // The width and height parameters must be no greater than the minimum of
+ // GL_MAX_VIEWPORT_DIMS and GL_MAX_TEXTURE_SIZE (see: glGetIntegerv).
+ // An error due to invalid dimensions might not be reported until
+ // updateTexImage() is called.
+ virtual status_t dequeueBuffer(int *buf, uint32_t width, uint32_t height,
uint32_t format, uint32_t usage);
// queueBuffer returns a filled buffer to the SurfaceTexture. In addition, a
@@ -176,7 +180,11 @@ public:
// requestBuffers when a with and height of zero is requested.
// A call to setDefaultBufferSize() may trigger requestBuffers() to
// be called from the client.
- status_t setDefaultBufferSize(uint32_t w, uint32_t h);
+ // The width and height parameters must be no greater than the minimum of
+ // GL_MAX_VIEWPORT_DIMS and GL_MAX_TEXTURE_SIZE (see: glGetIntegerv).
+ // An error due to invalid dimensions might not be reported until
+ // updateTexImage() is called.
+ status_t setDefaultBufferSize(uint32_t width, uint32_t height);
// getCurrentBuffer returns the buffer associated with the current image.
sp<GraphicBuffer> getCurrentBuffer() const;