summaryrefslogtreecommitdiffstats
path: root/include/private
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-09-17 01:35:28 -0700
committerMathias Agopian <mathias@google.com>2009-09-17 01:35:28 -0700
commit9e3ebf8c45ff1872a473c948acb8b7d9e3648f56 (patch)
treecbfaa63349c73b17466028962c3e7eba7694100a /include/private
parent56a9496a8f4adf3bf27448e1f41757af513c2a40 (diff)
downloadframeworks_av-9e3ebf8c45ff1872a473c948acb8b7d9e3648f56.zip
frameworks_av-9e3ebf8c45ff1872a473c948acb8b7d9e3648f56.tar.gz
frameworks_av-9e3ebf8c45ff1872a473c948acb8b7d9e3648f56.tar.bz2
add basic time stats for surfaces lock time
Diffstat (limited to 'include/private')
-rw-r--r--include/private/ui/SharedBufferStack.h28
1 files changed, 20 insertions, 8 deletions
diff --git a/include/private/ui/SharedBufferStack.h b/include/private/ui/SharedBufferStack.h
index 8b0f154..c02b2e7 100644
--- a/include/private/ui/SharedBufferStack.h
+++ b/include/private/ui/SharedBufferStack.h
@@ -69,12 +69,6 @@ class SharedClient;
// ----------------------------------------------------------------------------
-struct FlatRegion { // 12 bytes
- static const unsigned int NUM_RECT_MAX = 1;
- uint32_t count;
- uint16_t rects[4*NUM_RECT_MAX];
-};
-
// should be 128 bytes (32 longs)
class SharedBufferStack
{
@@ -84,6 +78,18 @@ class SharedBufferStack
friend class SharedBufferServer;
public:
+ struct FlatRegion { // 12 bytes
+ static const unsigned int NUM_RECT_MAX = 1;
+ uint32_t count;
+ uint16_t rects[4*NUM_RECT_MAX];
+ };
+
+ struct Statistics { // 4 longs
+ typedef int32_t usecs_t;
+ usecs_t totalTime;
+ usecs_t reserved[3];
+ };
+
SharedBufferStack();
void init(int32_t identity);
status_t setDirtyRegion(int buffer, const Region& reg);
@@ -100,7 +106,8 @@ public:
volatile int32_t reallocMask;
int32_t identity; // surface's identity (const)
- int32_t reserved32[13];
+ int32_t reserved32[9];
+ Statistics stats;
FlatRegion dirtyRegion[NUM_BUFFER_MAX]; // 12*4=48 bytes
};
@@ -223,7 +230,7 @@ public:
status_t queue(int buf);
bool needNewBuffer(int buffer) const;
status_t setDirtyRegion(int buffer, const Region& reg);
-
+
private:
friend struct Condition;
friend struct DequeueCondition;
@@ -257,6 +264,8 @@ private:
};
int32_t tail;
+ // statistics...
+ nsecs_t mDequeueTime[NUM_BUFFER_MAX];
};
// ----------------------------------------------------------------------------
@@ -275,6 +284,9 @@ public:
Region getDirtyRegion(int buffer) const;
+ SharedBufferStack::Statistics getStats() const;
+
+
private:
struct UnlockUpdate : public UpdateBase {
const int lockedBuffer;