diff options
author | Mathias Agopian <mathias@google.com> | 2010-08-24 17:56:40 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-08-24 17:56:40 -0700 |
commit | 17c53d433cd83d6b7d77e80635d6d58e2f6f5b2e (patch) | |
tree | 8072df615fb3e512bc2208e3413606e504faa7b5 | |
parent | 5ac7b5def64625fdc9cfaf1bbdd013f5ada241f3 (diff) | |
parent | b00a1e3f7e415c72b6ff6d2073b5b78c0d39e0ee (diff) | |
download | frameworks_av-17c53d433cd83d6b7d77e80635d6d58e2f6f5b2e.zip frameworks_av-17c53d433cd83d6b7d77e80635d6d58e2f6f5b2e.tar.gz frameworks_av-17c53d433cd83d6b7d77e80635d6d58e2f6f5b2e.tar.bz2 |
am bc4389ed: am 8395b462: Merge "fix [2931513] Add support for setting the orientation of an ANativeWindow" into gingerbread
Merge commit 'bc4389edfbb5777aec1a9af7863b2ca3ade2fa64'
* commit 'bc4389edfbb5777aec1a9af7863b2ca3ade2fa64':
fix [2931513] Add support for setting the orientation of an ANativeWindow
-rw-r--r-- | include/private/surfaceflinger/SharedBufferStack.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/include/private/surfaceflinger/SharedBufferStack.h b/include/private/surfaceflinger/SharedBufferStack.h index 1eb178e..d016dfa 100644 --- a/include/private/surfaceflinger/SharedBufferStack.h +++ b/include/private/surfaceflinger/SharedBufferStack.h @@ -54,11 +54,6 @@ class SharedClient; // ---------------------------------------------------------------------------- -// 4 * (11 + 7 + (1 + 2*NUM_RECT_MAX) * NUM_BUFFER_MAX) * NUM_LAYERS_MAX -// 4 * (11 + 7 + (1 + 2*7)*16) * 31 -// 1032 * 31 -// = ~27 KiB (31992) - class SharedBufferStack { friend class SharedClient; @@ -85,7 +80,7 @@ public: }; struct FlatRegion { // 52 bytes = 4 * (1 + 2*N) - static const unsigned int NUM_RECT_MAX = 6; + static const unsigned int NUM_RECT_MAX = 5; uint32_t count; SmallRect rects[NUM_RECT_MAX]; }; @@ -93,13 +88,18 @@ public: struct BufferData { FlatRegion dirtyRegion; SmallRect crop; + uint8_t transform; + uint8_t reserved[3]; }; SharedBufferStack(); void init(int32_t identity); status_t setDirtyRegion(int buffer, const Region& reg); status_t setCrop(int buffer, const Rect& reg); + status_t setTransform(int buffer, uint8_t transform); Region getDirtyRegion(int buffer) const; + Rect getCrop(int buffer) const; + uint32_t getTransform(int buffer) const; // these attributes are part of the conditions/updates volatile int32_t head; // server's current front buffer @@ -117,7 +117,7 @@ public: int32_t reserved32[1]; Statistics stats; int32_t reserved; - BufferData buffers[NUM_BUFFER_MAX]; // 960 bytes + BufferData buffers[NUM_BUFFER_MAX]; // 1024 bytes }; // ---------------------------------------------------------------------------- @@ -206,7 +206,7 @@ public: bool needNewBuffer(int buffer) const; status_t setDirtyRegion(int buffer, const Region& reg); status_t setCrop(int buffer, const Rect& reg); - + status_t setTransform(int buffer, uint32_t transform); class SetBufferCountCallback { friend class SharedBufferClient; @@ -275,6 +275,8 @@ public: status_t reallocateAllExcept(int buffer); int32_t getQueuedCount() const; Region getDirtyRegion(int buffer) const; + Rect getCrop(int buffer) const; + uint32_t getTransform(int buffer) const; status_t resize(int newNumBuffers); |