Merge "SF: Add systrace lines for layer transactions"
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index a91fc8e..0f93cd7 100755
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -126,6 +126,7 @@
mPremultipliedAlpha = false;
mName = name;
+ mTransactionName = String8("TX - ") + mName;
mCurrentState.active.w = w;
mCurrentState.active.h = h;
@@ -1491,6 +1492,7 @@
mFlinger->setTransactionFlags(eTraversalNeeded);
}
mPendingStates.push_back(mCurrentState);
+ ATRACE_INT(mTransactionName.string(), mPendingStates.size());
}
void Layer::popPendingState(State* stateToCommit) {
@@ -1500,6 +1502,7 @@
(stateToCommit->flags & stateToCommit->mask);
mPendingStates.removeAt(0);
+ ATRACE_INT(mTransactionName.string(), mPendingStates.size());
}
bool Layer::applyPendingStates(State* stateToCommit) {
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 92353ae..d1ef57d 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -657,6 +657,7 @@
uint32_t mTextureName; // from GLES
bool mPremultipliedAlpha;
String8 mName;
+ String8 mTransactionName; // A cached version of "TX - " + mName for systraces
PixelFormat mFormat;
// these are protected by an external lock