Loading include/private/ui/SharedBufferStack.h +20 −8 Original line number Original line Diff line number Diff line Loading @@ -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) // should be 128 bytes (32 longs) class SharedBufferStack class SharedBufferStack { { Loading @@ -84,6 +78,18 @@ class SharedBufferStack friend class SharedBufferServer; friend class SharedBufferServer; public: 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(); SharedBufferStack(); void init(int32_t identity); void init(int32_t identity); status_t setDirtyRegion(int buffer, const Region& reg); status_t setDirtyRegion(int buffer, const Region& reg); Loading @@ -100,7 +106,8 @@ public: volatile int32_t reallocMask; volatile int32_t reallocMask; int32_t identity; // surface's identity (const) 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 FlatRegion dirtyRegion[NUM_BUFFER_MAX]; // 12*4=48 bytes }; }; Loading Loading @@ -257,6 +264,8 @@ private: }; }; int32_t tail; int32_t tail; // statistics... nsecs_t mDequeueTime[NUM_BUFFER_MAX]; }; }; // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- Loading @@ -275,6 +284,9 @@ public: Region getDirtyRegion(int buffer) const; Region getDirtyRegion(int buffer) const; SharedBufferStack::Statistics getStats() const; private: private: struct UnlockUpdate : public UpdateBase { struct UnlockUpdate : public UpdateBase { const int lockedBuffer; const int lockedBuffer; Loading Loading
include/private/ui/SharedBufferStack.h +20 −8 Original line number Original line Diff line number Diff line Loading @@ -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) // should be 128 bytes (32 longs) class SharedBufferStack class SharedBufferStack { { Loading @@ -84,6 +78,18 @@ class SharedBufferStack friend class SharedBufferServer; friend class SharedBufferServer; public: 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(); SharedBufferStack(); void init(int32_t identity); void init(int32_t identity); status_t setDirtyRegion(int buffer, const Region& reg); status_t setDirtyRegion(int buffer, const Region& reg); Loading @@ -100,7 +106,8 @@ public: volatile int32_t reallocMask; volatile int32_t reallocMask; int32_t identity; // surface's identity (const) 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 FlatRegion dirtyRegion[NUM_BUFFER_MAX]; // 12*4=48 bytes }; }; Loading Loading @@ -257,6 +264,8 @@ private: }; }; int32_t tail; int32_t tail; // statistics... nsecs_t mDequeueTime[NUM_BUFFER_MAX]; }; }; // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- Loading @@ -275,6 +284,9 @@ public: Region getDirtyRegion(int buffer) const; Region getDirtyRegion(int buffer) const; SharedBufferStack::Statistics getStats() const; private: private: struct UnlockUpdate : public UpdateBase { struct UnlockUpdate : public UpdateBase { const int lockedBuffer; const int lockedBuffer; Loading