Loading libs/gui/SurfaceComposerClient.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -701,14 +701,15 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setLayer } SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setMetadata( const sp<SurfaceControl>& sc, uint32_t key, std::vector<uint8_t> data) { const sp<SurfaceControl>& sc, uint32_t key, const Parcel& p) { layer_state_t* s = getLayerState(sc); if (!s) { mStatus = BAD_INDEX; return *this; } s->what |= layer_state_t::eMetadataChanged; s->metadata.mMap[key] = std::move(data); s->metadata.mMap[key] = {p.data(), p.data() + p.dataSize()}; registerSurfaceControlForCallback(sc); return *this; Loading libs/gui/include/gui/LayerMetadata.h +6 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,12 @@ namespace android { enum { METADATA_OWNER_UID = 1, METADATA_WINDOW_TYPE = 2, METADATA_TASK_ID = 3 }; enum { METADATA_OWNER_UID = 1, METADATA_WINDOW_TYPE = 2, METADATA_TASK_ID = 3, METADATA_MOUSE_CURSOR = 4, }; struct LayerMetadata : public Parcelable { std::unordered_map<uint32_t, std::vector<uint8_t>> mMap; Loading libs/gui/include/gui/SurfaceComposerClient.h +1 −2 Original line number Diff line number Diff line Loading @@ -362,8 +362,7 @@ public: Transaction& setCrop_legacy(const sp<SurfaceControl>& sc, const Rect& crop); Transaction& setCornerRadius(const sp<SurfaceControl>& sc, float cornerRadius); Transaction& setLayerStack(const sp<SurfaceControl>& sc, uint32_t layerStack); Transaction& setMetadata(const sp<SurfaceControl>& sc, uint32_t key, std::vector<uint8_t> data); Transaction& setMetadata(const sp<SurfaceControl>& sc, uint32_t key, const Parcel& p); // Defers applying any changes made in this transaction until the Layer // identified by handle reaches the given frameNumber. If the Layer identified // by handle is removed, then we will apply this transaction regardless of Loading Loading
libs/gui/SurfaceComposerClient.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -701,14 +701,15 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setLayer } SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setMetadata( const sp<SurfaceControl>& sc, uint32_t key, std::vector<uint8_t> data) { const sp<SurfaceControl>& sc, uint32_t key, const Parcel& p) { layer_state_t* s = getLayerState(sc); if (!s) { mStatus = BAD_INDEX; return *this; } s->what |= layer_state_t::eMetadataChanged; s->metadata.mMap[key] = std::move(data); s->metadata.mMap[key] = {p.data(), p.data() + p.dataSize()}; registerSurfaceControlForCallback(sc); return *this; Loading
libs/gui/include/gui/LayerMetadata.h +6 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,12 @@ namespace android { enum { METADATA_OWNER_UID = 1, METADATA_WINDOW_TYPE = 2, METADATA_TASK_ID = 3 }; enum { METADATA_OWNER_UID = 1, METADATA_WINDOW_TYPE = 2, METADATA_TASK_ID = 3, METADATA_MOUSE_CURSOR = 4, }; struct LayerMetadata : public Parcelable { std::unordered_map<uint32_t, std::vector<uint8_t>> mMap; Loading
libs/gui/include/gui/SurfaceComposerClient.h +1 −2 Original line number Diff line number Diff line Loading @@ -362,8 +362,7 @@ public: Transaction& setCrop_legacy(const sp<SurfaceControl>& sc, const Rect& crop); Transaction& setCornerRadius(const sp<SurfaceControl>& sc, float cornerRadius); Transaction& setLayerStack(const sp<SurfaceControl>& sc, uint32_t layerStack); Transaction& setMetadata(const sp<SurfaceControl>& sc, uint32_t key, std::vector<uint8_t> data); Transaction& setMetadata(const sp<SurfaceControl>& sc, uint32_t key, const Parcel& p); // Defers applying any changes made in this transaction until the Layer // identified by handle reaches the given frameNumber. If the Layer identified // by handle is removed, then we will apply this transaction regardless of Loading