Loading include/gui/ISurfaceComposer.h +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ public: /* create a display * requires ACCESS_SURFACE_FLINGER permission. */ virtual sp<IBinder> createDisplay() = 0; virtual sp<IBinder> createDisplay(const String8& displayName) = 0; /* get the token for the existing default displays. possible values * for id are eDisplayIdMain and eDisplayIdHdmi. Loading include/gui/SurfaceComposerClient.h +1 −1 Original line number Diff line number Diff line Loading @@ -85,7 +85,7 @@ public: ); //! Create a display static sp<IBinder> createDisplay(); static sp<IBinder> createDisplay(const String8& displayName); //! Get the token for the existing default displays. //! Possible values for id are eDisplayIdMain and eDisplayIdHdmi. Loading libs/gui/ISurfaceComposer.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -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(); } Loading Loading @@ -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; Loading libs/gui/SurfaceComposerClient.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -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, Loading Loading @@ -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) { Loading Loading @@ -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) { Loading services/surfaceflinger/DisplayDevice.cpp +14 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,20 @@ void DisplayDevice::init(EGLConfig config) // get an h/w composer ID mHwcDisplayId = mFlinger->allocateHwcDisplayId(mType); // Name the display. The name will be replaced shortly if the display // was created with createDisplay(). switch (mType) { case DISPLAY_PRIMARY: mDisplayName = "Built-in Screen"; break; case DISPLAY_EXTERNAL: mDisplayName = "HDMI Screen"; break; default: mDisplayName = "Virtual Screen"; // e.g. Overlay #n break; } // initialize the display orientation transform. setProjection(DisplayState::eOrientationDefault, mViewport, mFrame); } Loading Loading
include/gui/ISurfaceComposer.h +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ public: /* create a display * requires ACCESS_SURFACE_FLINGER permission. */ virtual sp<IBinder> createDisplay() = 0; virtual sp<IBinder> createDisplay(const String8& displayName) = 0; /* get the token for the existing default displays. possible values * for id are eDisplayIdMain and eDisplayIdHdmi. Loading
include/gui/SurfaceComposerClient.h +1 −1 Original line number Diff line number Diff line Loading @@ -85,7 +85,7 @@ public: ); //! Create a display static sp<IBinder> createDisplay(); static sp<IBinder> createDisplay(const String8& displayName); //! Get the token for the existing default displays. //! Possible values for id are eDisplayIdMain and eDisplayIdHdmi. Loading
libs/gui/ISurfaceComposer.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -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(); } Loading Loading @@ -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; Loading
libs/gui/SurfaceComposerClient.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -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, Loading Loading @@ -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) { Loading Loading @@ -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) { Loading
services/surfaceflinger/DisplayDevice.cpp +14 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,20 @@ void DisplayDevice::init(EGLConfig config) // get an h/w composer ID mHwcDisplayId = mFlinger->allocateHwcDisplayId(mType); // Name the display. The name will be replaced shortly if the display // was created with createDisplay(). switch (mType) { case DISPLAY_PRIMARY: mDisplayName = "Built-in Screen"; break; case DISPLAY_EXTERNAL: mDisplayName = "HDMI Screen"; break; default: mDisplayName = "Virtual Screen"; // e.g. Overlay #n break; } // initialize the display orientation transform. setProjection(DisplayState::eOrientationDefault, mViewport, mFrame); } Loading