summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorAndy McFadden <fadden@android.com>2012-09-17 18:27:17 -0700
committerAndy McFadden <fadden@android.com>2012-09-18 09:20:23 -0700
commit8dfa92fef9759a881e96ee58d59875d35023aab9 (patch)
treec004a49450a89c5ae204eb1d9d4398e44a4badab /libs
parentd870703d5566490cfdfb389d9336b2b8d3c6cc7a (diff)
downloadframeworks_native-8dfa92fef9759a881e96ee58d59875d35023aab9.zip
frameworks_native-8dfa92fef9759a881e96ee58d59875d35023aab9.tar.gz
frameworks_native-8dfa92fef9759a881e96ee58d59875d35023aab9.tar.bz2
Plumb display name into SurfaceFlinger
The Surface createDisplay() call takes a display name for debugging. This change carries it through SurfaceFlinger and displays it in the "dumpsys SurfaceFlinger" output. Bug 7058158 Change-Id: I79f3474a8656ff1beb7b478e0dbf2c5de666118a
Diffstat (limited to 'libs')
-rw-r--r--libs/gui/ISurfaceComposer.cpp6
-rw-r--r--libs/gui/SurfaceComposerClient.cpp10
2 files changed, 9 insertions, 7 deletions
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp
index 6bcc41d..07d2b79 100644
--- a/libs/gui/ISurfaceComposer.cpp
+++ b/libs/gui/ISurfaceComposer.cpp
@@ -179,10 +179,11 @@ public:
return result;
}
- virtual sp<IBinder> createDisplay()
+ virtual sp<IBinder> createDisplay(const String8& displayName)
{
Parcel data, reply;
data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
+ data.writeString8(displayName);
remote()->transact(BnSurfaceComposer::CREATE_DISPLAY, data, &reply);
return reply.readStrongBinder();
}
@@ -305,7 +306,8 @@ status_t BnSurfaceComposer::onTransact(
} break;
case CREATE_DISPLAY: {
CHECK_INTERFACE(ISurfaceComposer, data, reply);
- sp<IBinder> display(createDisplay());
+ String8 displayName = data.readString8();
+ sp<IBinder> display(createDisplay(displayName));
reply->writeStrongBinder(display);
return NO_ERROR;
} break;
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 9b43ae8..9cf9cb5 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -128,7 +128,7 @@ class Composer : public Singleton<Composer>
DisplayState& getDisplayStateLocked(const sp<IBinder>& token);
public:
- sp<IBinder> createDisplay();
+ sp<IBinder> createDisplay(const String8& displayName);
sp<IBinder> getBuiltInDisplay(int32_t id);
status_t setPosition(const sp<SurfaceComposerClient>& client, SurfaceID id,
@@ -168,8 +168,8 @@ ANDROID_SINGLETON_STATIC_INSTANCE(Composer);
// ---------------------------------------------------------------------------
-sp<IBinder> Composer::createDisplay() {
- return ComposerService::getComposerService()->createDisplay();
+sp<IBinder> Composer::createDisplay(const String8& displayName) {
+ return ComposerService::getComposerService()->createDisplay(displayName);
}
sp<IBinder> Composer::getBuiltInDisplay(int32_t id) {
@@ -442,8 +442,8 @@ sp<SurfaceControl> SurfaceComposerClient::createSurface(
return result;
}
-sp<IBinder> SurfaceComposerClient::createDisplay() {
- return Composer::getInstance().createDisplay();
+sp<IBinder> SurfaceComposerClient::createDisplay(const String8& displayName) {
+ return Composer::getInstance().createDisplay(displayName);
}
sp<IBinder> SurfaceComposerClient::getBuiltInDisplay(int32_t id) {