Loading libs/gui/include/gui/BufferItemConsumer.h +14 −12 Original line number Diff line number Diff line Loading @@ -47,6 +47,12 @@ class BufferItemConsumer: public ConsumerBase enum { INVALID_BUFFER_SLOT = BufferQueue::INVALID_BUFFER_SLOT }; enum { NO_BUFFER_AVAILABLE = BufferQueue::NO_BUFFER_AVAILABLE }; // Create a new buffer item consumer. The consumerUsage parameter determines // the consumer usage flags passed to the graphics allocator. The // bufferCount parameter specifies how many buffers can be locked for user // access at the same time. // controlledByApp tells whether this consumer is controlled by the // application. static std::tuple<sp<BufferItemConsumer>, sp<Surface>> create( uint64_t consumerUsage, int bufferCount = DEFAULT_MAX_BUFFERS, bool controlledByApp = false, bool isConsumerSurfaceFlinger = false); Loading @@ -57,18 +63,6 @@ class BufferItemConsumer: public ConsumerBase bool controlledByApp = false) __attribute((deprecated("Prefer ctors that create their own surface and consumer."))); // Create a new buffer item consumer. The consumerUsage parameter determines // the consumer usage flags passed to the graphics allocator. The // bufferCount parameter specifies how many buffers can be locked for user // access at the same time. // controlledByApp tells whether this consumer is controlled by the // application. BufferItemConsumer(uint64_t consumerUsage, int bufferCount = DEFAULT_MAX_BUFFERS, bool controlledByApp = false, bool isConsumerSurfaceFlinger = false); BufferItemConsumer(const sp<IGraphicBufferConsumer>& consumer, uint64_t consumerUsage, int bufferCount = DEFAULT_MAX_BUFFERS, bool controlledByApp = false) __attribute((deprecated("Prefer ctors that create their own surface and consumer."))); ~BufferItemConsumer() override; // setBufferFreedListener sets the listener object that will be notified Loading Loading @@ -116,7 +110,15 @@ protected: const sp<IGraphicBufferConsumer>& consumer, uint64_t consumerUsage, int bufferCount = DEFAULT_MAX_BUFFERS, bool controlledByApp = false); BufferItemConsumer(uint64_t consumerUsage, int bufferCount = DEFAULT_MAX_BUFFERS, bool controlledByApp = false, bool isConsumerSurfaceFlinger = false); BufferItemConsumer(const sp<IGraphicBufferConsumer>& consumer, uint64_t consumerUsage, int bufferCount = DEFAULT_MAX_BUFFERS, bool controlledByApp = false) __attribute((deprecated("Prefer ctors that create their own surface and consumer."))); private: friend sp<BufferItemConsumer>; void initialize(uint64_t consumerUsage, int bufferCount); status_t releaseBufferSlotLocked(int slotIndex, const sp<GraphicBuffer>& buffer, Loading libs/gui/include/gui/CpuConsumer.h +10 −11 Original line number Diff line number Diff line Loading @@ -100,13 +100,6 @@ class CpuConsumer : public ConsumerBase bool controlledByApp = false) __attribute((deprecated("Prefer ctors that create their own surface and consumer."))); CpuConsumer(size_t maxLockedBuffers, bool controlledByApp = false, bool isConsumerSurfaceFlinger = false); CpuConsumer(const sp<IGraphicBufferConsumer>& bq, size_t maxLockedBuffers, bool controlledByApp = false) __attribute((deprecated("Prefer ctors that create their own surface and consumer."))); // Gets the next graphics buffer from the producer and locks it for CPU use, // filling out the passed-in locked buffer structure with the native pointer // and metadata. Returns BAD_VALUE if no new buffer is available, and Loading @@ -125,6 +118,15 @@ class CpuConsumer : public ConsumerBase status_t unlockBuffer(const LockedBuffer &nativeBuffer); private: friend class sp<CpuConsumer>; CpuConsumer(size_t maxLockedBuffers, bool controlledByApp = false, bool isConsumerSurfaceFlinger = false); CpuConsumer(const sp<IGraphicBufferConsumer>& bq, size_t maxLockedBuffers, bool controlledByApp = false) __attribute((deprecated("Prefer ctors that create their own surface and consumer."))); // Maximum number of buffers that can be locked at a time const size_t mMaxLockedBuffers; Loading @@ -139,10 +141,7 @@ class CpuConsumer : public ConsumerBase sp<GraphicBuffer> mGraphicBuffer; uintptr_t mLockedBufferId; AcquiredBuffer() : mSlot(BufferQueue::INVALID_BUFFER_SLOT), mLockedBufferId(kUnusedId) { } AcquiredBuffer() : mSlot(BufferQueue::INVALID_BUFFER_SLOT), mLockedBufferId(kUnusedId) {} void reset() { mSlot = BufferQueue::INVALID_BUFFER_SLOT; Loading libs/gui/include/gui/GLConsumer.h +14 −12 Original line number Diff line number Diff line Loading @@ -97,18 +97,6 @@ public: __attribute((deprecated( "Prefer create functions that create their own surface and consumer."))); GLConsumer(uint32_t tex, uint32_t textureTarget, bool useFenceSync, bool isControlledByApp); GLConsumer(uint32_t textureTarget, bool useFenceSync, bool isControlledByApp); GLConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t tex, uint32_t textureTarget, bool useFenceSync, bool isControlledByApp) __attribute((deprecated("Prefer ctors that create their own surface and consumer."))); GLConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t textureTarget, bool useFenceSync, bool isControlledByApp) __attribute((deprecated("Prefer ctors that create their own surface and consumer."))); // updateTexImage acquires the most recently queued buffer, and sets the // image contents of the target texture to it. // Loading Loading @@ -319,6 +307,20 @@ protected: status_t checkAndUpdateEglStateLocked(bool contextCheck = false); private: friend class sp<GLConsumer>; GLConsumer(uint32_t tex, uint32_t textureTarget, bool useFenceSync, bool isControlledByApp); GLConsumer(uint32_t textureTarget, bool useFenceSync, bool isControlledByApp); GLConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t tex, uint32_t textureTarget, bool useFenceSync, bool isControlledByApp) __attribute((deprecated("Prefer ctors that create their own surface and consumer."))); GLConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t textureTarget, bool useFenceSync, bool isControlledByApp) __attribute((deprecated("Prefer ctors that create their own surface and consumer."))); // EglImage is a utility class for tracking and creating EGLImageKHRs. There // is primarily just one image per slot, but there is also special cases: // - For releaseTexImage, we use a debug image (mReleasedTexImage) Loading Loading
libs/gui/include/gui/BufferItemConsumer.h +14 −12 Original line number Diff line number Diff line Loading @@ -47,6 +47,12 @@ class BufferItemConsumer: public ConsumerBase enum { INVALID_BUFFER_SLOT = BufferQueue::INVALID_BUFFER_SLOT }; enum { NO_BUFFER_AVAILABLE = BufferQueue::NO_BUFFER_AVAILABLE }; // Create a new buffer item consumer. The consumerUsage parameter determines // the consumer usage flags passed to the graphics allocator. The // bufferCount parameter specifies how many buffers can be locked for user // access at the same time. // controlledByApp tells whether this consumer is controlled by the // application. static std::tuple<sp<BufferItemConsumer>, sp<Surface>> create( uint64_t consumerUsage, int bufferCount = DEFAULT_MAX_BUFFERS, bool controlledByApp = false, bool isConsumerSurfaceFlinger = false); Loading @@ -57,18 +63,6 @@ class BufferItemConsumer: public ConsumerBase bool controlledByApp = false) __attribute((deprecated("Prefer ctors that create their own surface and consumer."))); // Create a new buffer item consumer. The consumerUsage parameter determines // the consumer usage flags passed to the graphics allocator. The // bufferCount parameter specifies how many buffers can be locked for user // access at the same time. // controlledByApp tells whether this consumer is controlled by the // application. BufferItemConsumer(uint64_t consumerUsage, int bufferCount = DEFAULT_MAX_BUFFERS, bool controlledByApp = false, bool isConsumerSurfaceFlinger = false); BufferItemConsumer(const sp<IGraphicBufferConsumer>& consumer, uint64_t consumerUsage, int bufferCount = DEFAULT_MAX_BUFFERS, bool controlledByApp = false) __attribute((deprecated("Prefer ctors that create their own surface and consumer."))); ~BufferItemConsumer() override; // setBufferFreedListener sets the listener object that will be notified Loading Loading @@ -116,7 +110,15 @@ protected: const sp<IGraphicBufferConsumer>& consumer, uint64_t consumerUsage, int bufferCount = DEFAULT_MAX_BUFFERS, bool controlledByApp = false); BufferItemConsumer(uint64_t consumerUsage, int bufferCount = DEFAULT_MAX_BUFFERS, bool controlledByApp = false, bool isConsumerSurfaceFlinger = false); BufferItemConsumer(const sp<IGraphicBufferConsumer>& consumer, uint64_t consumerUsage, int bufferCount = DEFAULT_MAX_BUFFERS, bool controlledByApp = false) __attribute((deprecated("Prefer ctors that create their own surface and consumer."))); private: friend sp<BufferItemConsumer>; void initialize(uint64_t consumerUsage, int bufferCount); status_t releaseBufferSlotLocked(int slotIndex, const sp<GraphicBuffer>& buffer, Loading
libs/gui/include/gui/CpuConsumer.h +10 −11 Original line number Diff line number Diff line Loading @@ -100,13 +100,6 @@ class CpuConsumer : public ConsumerBase bool controlledByApp = false) __attribute((deprecated("Prefer ctors that create their own surface and consumer."))); CpuConsumer(size_t maxLockedBuffers, bool controlledByApp = false, bool isConsumerSurfaceFlinger = false); CpuConsumer(const sp<IGraphicBufferConsumer>& bq, size_t maxLockedBuffers, bool controlledByApp = false) __attribute((deprecated("Prefer ctors that create their own surface and consumer."))); // Gets the next graphics buffer from the producer and locks it for CPU use, // filling out the passed-in locked buffer structure with the native pointer // and metadata. Returns BAD_VALUE if no new buffer is available, and Loading @@ -125,6 +118,15 @@ class CpuConsumer : public ConsumerBase status_t unlockBuffer(const LockedBuffer &nativeBuffer); private: friend class sp<CpuConsumer>; CpuConsumer(size_t maxLockedBuffers, bool controlledByApp = false, bool isConsumerSurfaceFlinger = false); CpuConsumer(const sp<IGraphicBufferConsumer>& bq, size_t maxLockedBuffers, bool controlledByApp = false) __attribute((deprecated("Prefer ctors that create their own surface and consumer."))); // Maximum number of buffers that can be locked at a time const size_t mMaxLockedBuffers; Loading @@ -139,10 +141,7 @@ class CpuConsumer : public ConsumerBase sp<GraphicBuffer> mGraphicBuffer; uintptr_t mLockedBufferId; AcquiredBuffer() : mSlot(BufferQueue::INVALID_BUFFER_SLOT), mLockedBufferId(kUnusedId) { } AcquiredBuffer() : mSlot(BufferQueue::INVALID_BUFFER_SLOT), mLockedBufferId(kUnusedId) {} void reset() { mSlot = BufferQueue::INVALID_BUFFER_SLOT; Loading
libs/gui/include/gui/GLConsumer.h +14 −12 Original line number Diff line number Diff line Loading @@ -97,18 +97,6 @@ public: __attribute((deprecated( "Prefer create functions that create their own surface and consumer."))); GLConsumer(uint32_t tex, uint32_t textureTarget, bool useFenceSync, bool isControlledByApp); GLConsumer(uint32_t textureTarget, bool useFenceSync, bool isControlledByApp); GLConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t tex, uint32_t textureTarget, bool useFenceSync, bool isControlledByApp) __attribute((deprecated("Prefer ctors that create their own surface and consumer."))); GLConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t textureTarget, bool useFenceSync, bool isControlledByApp) __attribute((deprecated("Prefer ctors that create their own surface and consumer."))); // updateTexImage acquires the most recently queued buffer, and sets the // image contents of the target texture to it. // Loading Loading @@ -319,6 +307,20 @@ protected: status_t checkAndUpdateEglStateLocked(bool contextCheck = false); private: friend class sp<GLConsumer>; GLConsumer(uint32_t tex, uint32_t textureTarget, bool useFenceSync, bool isControlledByApp); GLConsumer(uint32_t textureTarget, bool useFenceSync, bool isControlledByApp); GLConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t tex, uint32_t textureTarget, bool useFenceSync, bool isControlledByApp) __attribute((deprecated("Prefer ctors that create their own surface and consumer."))); GLConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t textureTarget, bool useFenceSync, bool isControlledByApp) __attribute((deprecated("Prefer ctors that create their own surface and consumer."))); // EglImage is a utility class for tracking and creating EGLImageKHRs. There // is primarily just one image per slot, but there is also special cases: // - For releaseTexImage, we use a debug image (mReleasedTexImage) Loading