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
commit86f7329080cbb6f70d56278b005c820f0360d84b (patch)
treebead00e53f19c5cd417135cc5bbb5c266b7750e4 /include/private
parent5140a13b5eff0b9ba89cb954ba645ca468257548 (diff)
downloadframeworks_native-86f7329080cbb6f70d56278b005c820f0360d84b.zip
frameworks_native-86f7329080cbb6f70d56278b005c820f0360d84b.tar.gz
frameworks_native-86f7329080cbb6f70d56278b005c820f0360d84b.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;