Loading include/gui/BufferQueueConsumer.h +6 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,12 @@ public: // enumerated in gralloc.h, e.g. GRALLOC_USAGE_HW_RENDER; the default is 0. virtual status_t setConsumerUsageBits(uint32_t usage); // setConsumerIsProtected will turn on an internal bit that indicates whether // the consumer can handle protected gralloc buffers (i.e. with // GRALLOC_USAGE_PROTECTED set). IGraphicBufferProducer can query this // capability using NATIVE_WINDOW_CONSUMER_IS_PROTECTED. virtual status_t setConsumerIsProtected(bool isProtected); // setTransformHint bakes in rotation to buffers so overlays can be used. // The values are enumerated in window.h, e.g. // NATIVE_WINDOW_TRANSFORM_ROT_90. The default is 0 (no transform). Loading include/gui/BufferQueueCore.h +4 −0 Original line number Diff line number Diff line Loading @@ -172,6 +172,10 @@ private: // GraphicBuffers. uint32_t mConsumerUsageBits; // mConsumerIsProtected indicates the consumer is ready to handle protected // buffer. bool mConsumerIsProtected; // mConnectedApi indicates the producer API that is currently connected // to this BufferQueue. It defaults to NO_CONNECTED_API, and gets updated // by the connect and disconnect methods. Loading include/gui/IGraphicBufferConsumer.h +6 −0 Original line number Diff line number Diff line Loading @@ -243,6 +243,12 @@ public: // Return of a value other than NO_ERROR means an unknown error has occurred. virtual status_t setConsumerUsageBits(uint32_t usage) = 0; // setConsumerIsProtected will turn on an internal bit that indicates whether // the consumer can handle protected gralloc buffers (i.e. with // GRALLOC_USAGE_PROTECTED set). IGraphicBufferProducer can query this // capability using NATIVE_WINDOW_CONSUMER_IS_PROTECTED. virtual status_t setConsumerIsProtected(bool isProtected) = 0; // setTransformHint bakes in rotation to buffers so overlays can be used. The values are // enumerated in window.h, e.g. NATIVE_WINDOW_TRANSFORM_ROT_90. The default is 0 // (no transform). Loading libs/gui/BufferQueueConsumer.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -709,6 +709,14 @@ status_t BufferQueueConsumer::setConsumerUsageBits(uint32_t usage) { return NO_ERROR; } status_t BufferQueueConsumer::setConsumerIsProtected(bool isProtected) { ATRACE_CALL(); BQ_LOGV("setConsumerIsProtected: %s", isProtected ? "true" : "false"); Mutex::Autolock lock(mCore->mMutex); mCore->mConsumerIsProtected = isProtected; return NO_ERROR; } status_t BufferQueueConsumer::setTransformHint(uint32_t hint) { ATRACE_CALL(); BQ_LOGV("setTransformHint: %#x", hint); Loading libs/gui/BufferQueueCore.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ BufferQueueCore::BufferQueueCore() : mConsumerName(getUniqueName()), mConsumerListener(), mConsumerUsageBits(0), mConsumerIsProtected(false), mConnectedApi(NO_CONNECTED_API), mLinkedToDeath(), mConnectedProducerListener(), Loading Loading
include/gui/BufferQueueConsumer.h +6 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,12 @@ public: // enumerated in gralloc.h, e.g. GRALLOC_USAGE_HW_RENDER; the default is 0. virtual status_t setConsumerUsageBits(uint32_t usage); // setConsumerIsProtected will turn on an internal bit that indicates whether // the consumer can handle protected gralloc buffers (i.e. with // GRALLOC_USAGE_PROTECTED set). IGraphicBufferProducer can query this // capability using NATIVE_WINDOW_CONSUMER_IS_PROTECTED. virtual status_t setConsumerIsProtected(bool isProtected); // setTransformHint bakes in rotation to buffers so overlays can be used. // The values are enumerated in window.h, e.g. // NATIVE_WINDOW_TRANSFORM_ROT_90. The default is 0 (no transform). Loading
include/gui/BufferQueueCore.h +4 −0 Original line number Diff line number Diff line Loading @@ -172,6 +172,10 @@ private: // GraphicBuffers. uint32_t mConsumerUsageBits; // mConsumerIsProtected indicates the consumer is ready to handle protected // buffer. bool mConsumerIsProtected; // mConnectedApi indicates the producer API that is currently connected // to this BufferQueue. It defaults to NO_CONNECTED_API, and gets updated // by the connect and disconnect methods. Loading
include/gui/IGraphicBufferConsumer.h +6 −0 Original line number Diff line number Diff line Loading @@ -243,6 +243,12 @@ public: // Return of a value other than NO_ERROR means an unknown error has occurred. virtual status_t setConsumerUsageBits(uint32_t usage) = 0; // setConsumerIsProtected will turn on an internal bit that indicates whether // the consumer can handle protected gralloc buffers (i.e. with // GRALLOC_USAGE_PROTECTED set). IGraphicBufferProducer can query this // capability using NATIVE_WINDOW_CONSUMER_IS_PROTECTED. virtual status_t setConsumerIsProtected(bool isProtected) = 0; // setTransformHint bakes in rotation to buffers so overlays can be used. The values are // enumerated in window.h, e.g. NATIVE_WINDOW_TRANSFORM_ROT_90. The default is 0 // (no transform). Loading
libs/gui/BufferQueueConsumer.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -709,6 +709,14 @@ status_t BufferQueueConsumer::setConsumerUsageBits(uint32_t usage) { return NO_ERROR; } status_t BufferQueueConsumer::setConsumerIsProtected(bool isProtected) { ATRACE_CALL(); BQ_LOGV("setConsumerIsProtected: %s", isProtected ? "true" : "false"); Mutex::Autolock lock(mCore->mMutex); mCore->mConsumerIsProtected = isProtected; return NO_ERROR; } status_t BufferQueueConsumer::setTransformHint(uint32_t hint) { ATRACE_CALL(); BQ_LOGV("setTransformHint: %#x", hint); Loading
libs/gui/BufferQueueCore.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ BufferQueueCore::BufferQueueCore() : mConsumerName(getUniqueName()), mConsumerListener(), mConsumerUsageBits(0), mConsumerIsProtected(false), mConnectedApi(NO_CONNECTED_API), mLinkedToDeath(), mConnectedProducerListener(), Loading