Loading include/gui/ISurfaceComposer.h +2 −4 Original line number Diff line number Diff line Loading @@ -69,7 +69,8 @@ public: /* create a display * requires ACCESS_SURFACE_FLINGER permission. */ virtual sp<IBinder> createDisplay(const String8& displayName) = 0; virtual sp<IBinder> createDisplay(const String8& displayName, bool secure) = 0; /* get the token for the existing default displays. possible values * for id are eDisplayIdMain and eDisplayIdHdmi. Loading Loading @@ -108,9 +109,6 @@ public: /* returns information about a display * intended to be used to get information about built-in displays */ virtual status_t getDisplayInfo(const sp<IBinder>& display, DisplayInfo* info) = 0; /* connects to an external display */ virtual void connectDisplay(const sp<ISurfaceTexture>& display) = 0; }; // ---------------------------------------------------------------------------- Loading include/gui/SurfaceComposerClient.h +1 −1 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ public: ); //! Create a display static sp<IBinder> createDisplay(const String8& displayName); static sp<IBinder> createDisplay(const String8& displayName, bool secure); //! Get the token for the existing default displays. //! Possible values for id are eDisplayIdMain and eDisplayIdHdmi. Loading include/ui/DisplayInfo.h +2 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,8 @@ struct DisplayInfo { float fps; float density; uint8_t orientation; uint8_t reserved[3]; bool secure; uint8_t reserved[2]; // TODO: this needs to go away (currently needed only by webkit) PixelFormatInfo pixelFormatInfo; }; Loading libs/gui/ISurfaceComposer.cpp +4 −16 Original line number Diff line number Diff line Loading @@ -179,11 +179,12 @@ public: return result; } virtual sp<IBinder> createDisplay(const String8& displayName) virtual sp<IBinder> createDisplay(const String8& displayName, bool secure) { Parcel data, reply; data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); data.writeString8(displayName); data.writeInt32(secure ? 1 : 0); remote()->transact(BnSurfaceComposer::CREATE_DISPLAY, data, &reply); return reply.readStrongBinder(); } Loading Loading @@ -222,14 +223,6 @@ public: memcpy(info, reply.readInplace(sizeof(DisplayInfo)), sizeof(DisplayInfo)); return reply.readInt32(); } virtual void connectDisplay(const sp<ISurfaceTexture>& display) { Parcel data, reply; data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); data.writeStrongBinder(display->asBinder()); remote()->transact(BnSurfaceComposer::CONNECT_DISPLAY, data, &reply); } }; IMPLEMENT_META_INTERFACE(SurfaceComposer, "android.ui.ISurfaceComposer"); Loading Loading @@ -309,7 +302,8 @@ status_t BnSurfaceComposer::onTransact( case CREATE_DISPLAY: { CHECK_INTERFACE(ISurfaceComposer, data, reply); String8 displayName = data.readString8(); sp<IBinder> display(createDisplay(displayName)); bool secure = bool(data.readInt32()); sp<IBinder> display(createDisplay(displayName, secure)); reply->writeStrongBinder(display); return NO_ERROR; } break; Loading Loading @@ -338,12 +332,6 @@ status_t BnSurfaceComposer::onTransact( memcpy(reply->writeInplace(sizeof(DisplayInfo)), &info, sizeof(DisplayInfo)); reply->writeInt32(result); } break; case CONNECT_DISPLAY: { CHECK_INTERFACE(ISurfaceComposer, data, reply); sp<ISurfaceTexture> surfaceTexture = interface_cast<ISurfaceTexture>(data.readStrongBinder()); connectDisplay(surfaceTexture); } break; default: return BBinder::onTransact(code, data, reply, flags); } Loading libs/gui/SurfaceComposerClient.cpp +7 −5 Original line number Diff line number Diff line Loading @@ -131,7 +131,7 @@ class Composer : public Singleton<Composer> DisplayState& getDisplayStateLocked(const sp<IBinder>& token); public: sp<IBinder> createDisplay(const String8& displayName); sp<IBinder> createDisplay(const String8& displayName, bool secure); sp<IBinder> getBuiltInDisplay(int32_t id); status_t setPosition(const sp<SurfaceComposerClient>& client, SurfaceID id, Loading Loading @@ -175,8 +175,9 @@ ANDROID_SINGLETON_STATIC_INSTANCE(Composer); // --------------------------------------------------------------------------- sp<IBinder> Composer::createDisplay(const String8& displayName) { return ComposerService::getComposerService()->createDisplay(displayName); sp<IBinder> Composer::createDisplay(const String8& displayName, bool secure) { return ComposerService::getComposerService()->createDisplay(displayName, secure); } sp<IBinder> Composer::getBuiltInDisplay(int32_t id) { Loading Loading @@ -459,8 +460,9 @@ sp<SurfaceControl> SurfaceComposerClient::createSurface( return result; } sp<IBinder> SurfaceComposerClient::createDisplay(const String8& displayName) { return Composer::getInstance().createDisplay(displayName); sp<IBinder> SurfaceComposerClient::createDisplay(const String8& displayName, bool secure) { return Composer::getInstance().createDisplay(displayName, secure); } sp<IBinder> SurfaceComposerClient::getBuiltInDisplay(int32_t id) { Loading Loading
include/gui/ISurfaceComposer.h +2 −4 Original line number Diff line number Diff line Loading @@ -69,7 +69,8 @@ public: /* create a display * requires ACCESS_SURFACE_FLINGER permission. */ virtual sp<IBinder> createDisplay(const String8& displayName) = 0; virtual sp<IBinder> createDisplay(const String8& displayName, bool secure) = 0; /* get the token for the existing default displays. possible values * for id are eDisplayIdMain and eDisplayIdHdmi. Loading Loading @@ -108,9 +109,6 @@ public: /* returns information about a display * intended to be used to get information about built-in displays */ virtual status_t getDisplayInfo(const sp<IBinder>& display, DisplayInfo* info) = 0; /* connects to an external display */ virtual void connectDisplay(const sp<ISurfaceTexture>& display) = 0; }; // ---------------------------------------------------------------------------- Loading
include/gui/SurfaceComposerClient.h +1 −1 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ public: ); //! Create a display static sp<IBinder> createDisplay(const String8& displayName); static sp<IBinder> createDisplay(const String8& displayName, bool secure); //! Get the token for the existing default displays. //! Possible values for id are eDisplayIdMain and eDisplayIdHdmi. Loading
include/ui/DisplayInfo.h +2 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,8 @@ struct DisplayInfo { float fps; float density; uint8_t orientation; uint8_t reserved[3]; bool secure; uint8_t reserved[2]; // TODO: this needs to go away (currently needed only by webkit) PixelFormatInfo pixelFormatInfo; }; Loading
libs/gui/ISurfaceComposer.cpp +4 −16 Original line number Diff line number Diff line Loading @@ -179,11 +179,12 @@ public: return result; } virtual sp<IBinder> createDisplay(const String8& displayName) virtual sp<IBinder> createDisplay(const String8& displayName, bool secure) { Parcel data, reply; data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); data.writeString8(displayName); data.writeInt32(secure ? 1 : 0); remote()->transact(BnSurfaceComposer::CREATE_DISPLAY, data, &reply); return reply.readStrongBinder(); } Loading Loading @@ -222,14 +223,6 @@ public: memcpy(info, reply.readInplace(sizeof(DisplayInfo)), sizeof(DisplayInfo)); return reply.readInt32(); } virtual void connectDisplay(const sp<ISurfaceTexture>& display) { Parcel data, reply; data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); data.writeStrongBinder(display->asBinder()); remote()->transact(BnSurfaceComposer::CONNECT_DISPLAY, data, &reply); } }; IMPLEMENT_META_INTERFACE(SurfaceComposer, "android.ui.ISurfaceComposer"); Loading Loading @@ -309,7 +302,8 @@ status_t BnSurfaceComposer::onTransact( case CREATE_DISPLAY: { CHECK_INTERFACE(ISurfaceComposer, data, reply); String8 displayName = data.readString8(); sp<IBinder> display(createDisplay(displayName)); bool secure = bool(data.readInt32()); sp<IBinder> display(createDisplay(displayName, secure)); reply->writeStrongBinder(display); return NO_ERROR; } break; Loading Loading @@ -338,12 +332,6 @@ status_t BnSurfaceComposer::onTransact( memcpy(reply->writeInplace(sizeof(DisplayInfo)), &info, sizeof(DisplayInfo)); reply->writeInt32(result); } break; case CONNECT_DISPLAY: { CHECK_INTERFACE(ISurfaceComposer, data, reply); sp<ISurfaceTexture> surfaceTexture = interface_cast<ISurfaceTexture>(data.readStrongBinder()); connectDisplay(surfaceTexture); } break; default: return BBinder::onTransact(code, data, reply, flags); } Loading
libs/gui/SurfaceComposerClient.cpp +7 −5 Original line number Diff line number Diff line Loading @@ -131,7 +131,7 @@ class Composer : public Singleton<Composer> DisplayState& getDisplayStateLocked(const sp<IBinder>& token); public: sp<IBinder> createDisplay(const String8& displayName); sp<IBinder> createDisplay(const String8& displayName, bool secure); sp<IBinder> getBuiltInDisplay(int32_t id); status_t setPosition(const sp<SurfaceComposerClient>& client, SurfaceID id, Loading Loading @@ -175,8 +175,9 @@ ANDROID_SINGLETON_STATIC_INSTANCE(Composer); // --------------------------------------------------------------------------- sp<IBinder> Composer::createDisplay(const String8& displayName) { return ComposerService::getComposerService()->createDisplay(displayName); sp<IBinder> Composer::createDisplay(const String8& displayName, bool secure) { return ComposerService::getComposerService()->createDisplay(displayName, secure); } sp<IBinder> Composer::getBuiltInDisplay(int32_t id) { Loading Loading @@ -459,8 +460,9 @@ sp<SurfaceControl> SurfaceComposerClient::createSurface( return result; } sp<IBinder> SurfaceComposerClient::createDisplay(const String8& displayName) { return Composer::getInstance().createDisplay(displayName); sp<IBinder> SurfaceComposerClient::createDisplay(const String8& displayName, bool secure) { return Composer::getInstance().createDisplay(displayName, secure); } sp<IBinder> SurfaceComposerClient::getBuiltInDisplay(int32_t id) { Loading