summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-02-26 18:59:23 -0800
committerMathias Agopian <mathias@google.com>2010-02-26 18:59:23 -0800
commit45853c975907ac9b5c4c11e9f74caa2bd01fea24 (patch)
tree74d51c4e9413b2bcae28b47e10f67bb1fca558fa /libs/surfaceflinger
parent32820ca5f93722969129446e18d290ba81a08a5f (diff)
downloadframeworks_native-45853c975907ac9b5c4c11e9f74caa2bd01fea24.zip
frameworks_native-45853c975907ac9b5c4c11e9f74caa2bd01fea24.tar.gz
frameworks_native-45853c975907ac9b5c4c11e9f74caa2bd01fea24.tar.bz2
to help debugging [2461567] Home screen redraw messed up
log SF's idea of the front buffer in dumpsys.
Diffstat (limited to 'libs/surfaceflinger')
-rw-r--r--libs/surfaceflinger/Layer.h2
-rw-r--r--libs/surfaceflinger/SurfaceFlinger.cpp4
2 files changed, 6 insertions, 0 deletions
diff --git a/libs/surfaceflinger/Layer.h b/libs/surfaceflinger/Layer.h
index 1310ecc..743afb4 100644
--- a/libs/surfaceflinger/Layer.h
+++ b/libs/surfaceflinger/Layer.h
@@ -78,6 +78,8 @@ public:
inline const sp<FreezeLock>& getFreezeLock() const { return mFreezeLock; }
// only for debugging
inline PixelFormat pixelFormat() const { return mFormat; }
+ // only for debugging
+ inline int getFrontBufferIndex() const { return mFrontBufferIndex; }
private:
inline sp<GraphicBuffer> getFrontBufferLocked() {
diff --git a/libs/surfaceflinger/SurfaceFlinger.cpp b/libs/surfaceflinger/SurfaceFlinger.cpp
index b408779..4555b3c 100644
--- a/libs/surfaceflinger/SurfaceFlinger.cpp
+++ b/libs/surfaceflinger/SurfaceFlinger.cpp
@@ -1519,6 +1519,10 @@ status_t SurfaceFlinger::dump(int fd, const Vector<String16>& args)
if (l != 0) {
SharedBufferStack::Statistics stats = l->lcblk->getStats();
result.append( l->lcblk->dump(" ") );
+ snprintf(buffer, SIZE,
+ " front-index=%u\n", l->getFrontBufferIndex());
+ result.append(buffer);
+
sp<const GraphicBuffer> buf0(l->getBuffer(0));
sp<const GraphicBuffer> buf1(l->getBuffer(1));
uint32_t w0=0, h0=0, s0=0;