diff options
author | Mathias Agopian <mathias@google.com> | 2011-07-19 15:24:46 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2011-07-19 15:24:46 -0700 |
commit | f07b8a3f691be39083fb5163f9456bcfa566f93f (patch) | |
tree | 885f9fcbb020c630c2b0ea20b13ca2ee850e5f3b /include/gui | |
parent | ff86f37b95327538b97b6b8ef5d3c6ed0cd7f902 (diff) | |
download | frameworks_base-f07b8a3f691be39083fb5163f9456bcfa566f93f.zip frameworks_base-f07b8a3f691be39083fb5163f9456bcfa566f93f.tar.gz frameworks_base-f07b8a3f691be39083fb5163f9456bcfa566f93f.tar.bz2 |
implement: "Add an ANativeWindow API for SurfaceFlinger to suggest an optimal buffer orientation"
Bug: 4487161
Change-Id: I883f34efe542c2a566d04966f873374f40c50092
Diffstat (limited to 'include/gui')
-rw-r--r-- | include/gui/ISurfaceTexture.h | 7 | ||||
-rw-r--r-- | include/gui/SurfaceTexture.h | 3 | ||||
-rw-r--r-- | include/gui/SurfaceTextureClient.h | 12 |
3 files changed, 20 insertions, 2 deletions
diff --git a/include/gui/ISurfaceTexture.h b/include/gui/ISurfaceTexture.h index 37a9b4a..e764425 100644 --- a/include/gui/ISurfaceTexture.h +++ b/include/gui/ISurfaceTexture.h @@ -78,7 +78,12 @@ protected: // client for this buffer. The timestamp is measured in nanoseconds, and // must be monotonically increasing. Its other properties (zero point, etc) // are client-dependent, and should be documented by the client. - virtual status_t queueBuffer(int slot, int64_t timestamp) = 0; + // + // outWidth, outHeight and outTransform are filed with the default width + // default height of the window and current transform applied to buffers, + // respectively. + virtual status_t queueBuffer(int slot, int64_t timestamp, + uint32_t* outWidth, uint32_t* outHeight, uint32_t* outTransform) = 0; // cancelBuffer indicates that the client does not wish to fill in the // buffer associated with slot and transfers ownership of the slot back to diff --git a/include/gui/SurfaceTexture.h b/include/gui/SurfaceTexture.h index e46765e..945f4bc 100644 --- a/include/gui/SurfaceTexture.h +++ b/include/gui/SurfaceTexture.h @@ -84,7 +84,8 @@ public: // nanoseconds, and must be monotonically increasing. Its other semantics // (zero point, etc) are client-dependent and should be documented by the // client. - virtual status_t queueBuffer(int buf, int64_t timestamp); + virtual status_t queueBuffer(int buf, int64_t timestamp, + uint32_t* outWidth, uint32_t* outHeight, uint32_t* outTransform); virtual void cancelBuffer(int buf); virtual status_t setCrop(const Rect& reg); virtual status_t setTransform(uint32_t transform); diff --git a/include/gui/SurfaceTextureClient.h b/include/gui/SurfaceTextureClient.h index 76e7119..829d8ab 100644 --- a/include/gui/SurfaceTextureClient.h +++ b/include/gui/SurfaceTextureClient.h @@ -151,6 +151,18 @@ private: // dequeued format or to mReqFormat if no buffer was dequeued. uint32_t mQueryFormat; + // mDefaultWidth is default width of the window, regardless of the + // set_dimension call + uint32_t mDefaultWidth; + + // mDefaultHeight is default width of the window, regardless of the + // set_dimension call + uint32_t mDefaultHeight; + + // mTransformHint is the transform probably applied to buffers of this + // window. this is only a hint, actual transform may differ. + uint32_t mTransformHint; + // mMutex is the mutex used to prevent concurrent access to the member // variables of SurfaceTexture objects. It must be locked whenever the // member variables are accessed. |