diff options
author | Dan Stoza <stoza@google.com> | 2015-06-05 15:01:58 -0700 |
---|---|---|
committer | Dan Stoza <stoza@google.com> | 2015-06-05 15:01:58 -0700 |
commit | 107fbe5599016b0e35145a1a00c4f238b63d61e4 (patch) | |
tree | fea2c90086fdc3b5f76f13c66cdde8f7585ff3b9 /include | |
parent | 9d2c5a7c678bd384df0fb29952cf8943e7b1b160 (diff) | |
download | frameworks_native-107fbe5599016b0e35145a1a00c4f238b63d61e4.tar.gz frameworks_native-107fbe5599016b0e35145a1a00c4f238b63d61e4.tar.bz2 frameworks_native-107fbe5599016b0e35145a1a00c4f238b63d61e4.zip |
libgui: Add getConsumerName
Adds a getConsumerName method to IGraphicBufferProducer and Surface.
Currently, the name is cached inside of IGBP and is updated on connect
and dequeueBuffer, which should be good enough for most uses.
Bug: 6667401
Change-Id: Ife94bd89023fe7c00bad916932b9a19233fd2290
Diffstat (limited to 'include')
-rw-r--r-- | include/gui/BufferQueueProducer.h | 3 | ||||
-rw-r--r-- | include/gui/IGraphicBufferProducer.h | 3 | ||||
-rw-r--r-- | include/gui/Surface.h | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/include/gui/BufferQueueProducer.h b/include/gui/BufferQueueProducer.h index afa7eb180..9754a89ea 100644 --- a/include/gui/BufferQueueProducer.h +++ b/include/gui/BufferQueueProducer.h @@ -178,6 +178,9 @@ public: // See IGraphicBufferProducer::setGenerationNumber virtual status_t setGenerationNumber(uint32_t generationNumber); + // See IGraphicBufferProducer::getConsumerName + virtual String8 getConsumerName() const override; + private: // This is required by the IBinder::DeathRecipient interface virtual void binderDied(const wp<IBinder>& who); diff --git a/include/gui/IGraphicBufferProducer.h b/include/gui/IGraphicBufferProducer.h index 4ca4cd50d..9530de1aa 100644 --- a/include/gui/IGraphicBufferProducer.h +++ b/include/gui/IGraphicBufferProducer.h @@ -480,6 +480,9 @@ public: // affected and will retain their current generation number. The generation // number defaults to 0. virtual status_t setGenerationNumber(uint32_t generationNumber) = 0; + + // Returns the name of the connected consumer. + virtual String8 getConsumerName() const = 0; }; // ---------------------------------------------------------------------------- diff --git a/include/gui/Surface.h b/include/gui/Surface.h index 261b07c8f..72f106707 100644 --- a/include/gui/Surface.h +++ b/include/gui/Surface.h @@ -106,6 +106,9 @@ public: * See IGBP::setGenerationNumber for more information. */ status_t setGenerationNumber(uint32_t generationNumber); + // See IGraphicBufferProducer::getConsumerName + String8 getConsumerName() const; + protected: virtual ~Surface(); |