improve SF logging/debugging a little bit
Change-Id: I6a57f89c25defc293fd748cc1fbd710031c02ec2
diff --git a/libs/surfaceflinger/LayerBase.cpp b/libs/surfaceflinger/LayerBase.cpp
index 63b5720..fdf6627 100644
--- a/libs/surfaceflinger/LayerBase.cpp
+++ b/libs/surfaceflinger/LayerBase.cpp
@@ -699,7 +699,8 @@
LayerBaseClient::LayerBaseClient(SurfaceFlinger* flinger, DisplayID display,
const sp<Client>& client, int32_t i)
: LayerBase(flinger, display), lcblk(NULL), client(client),
- mIndex(i), mIdentity(uint32_t(android_atomic_inc(&sIdentity)))
+ mDebug(false), mIndex(i),
+ mIdentity(uint32_t(android_atomic_inc(&sIdentity)))
{
lcblk = new SharedBufferServer(
client->ctrlblk, i, NUM_BUFFERS,
diff --git a/libs/surfaceflinger/LayerBase.h b/libs/surfaceflinger/LayerBase.h
index 7ac8bc5..852b9f9 100644
--- a/libs/surfaceflinger/LayerBase.h
+++ b/libs/surfaceflinger/LayerBase.h
@@ -369,6 +369,9 @@
friend class Surface;
+protected:
+ mutable bool mDebug;
+
private:
int32_t mIndex;
mutable Mutex mLock;
diff --git a/libs/surfaceflinger/SurfaceFlinger.cpp b/libs/surfaceflinger/SurfaceFlinger.cpp
index 2598440..26ee285 100644
--- a/libs/surfaceflinger/SurfaceFlinger.cpp
+++ b/libs/surfaceflinger/SurfaceFlinger.cpp
@@ -1523,10 +1523,6 @@
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;