Loading libs/ui/GraphicBufferAllocator.cpp +11 −5 Original line number Diff line number Diff line Loading @@ -111,11 +111,10 @@ void GraphicBufferAllocator::dumpToSystemLog() ALOGD("%s", s.c_str()); } status_t GraphicBufferAllocator::allocate(uint32_t width, uint32_t height, PixelFormat format, uint32_t layerCount, uint64_t usage, status_t GraphicBufferAllocator::allocate(uint32_t width, uint32_t height, PixelFormat format, uint32_t layerCount, uint64_t usage, buffer_handle_t* handle, uint32_t* stride, uint64_t /*graphicBufferId*/, std::string requestorName) { std::string requestorName) { ATRACE_CALL(); // make sure to not allocate a N x 0 or 0 x N buffer, since this is Loading Loading @@ -175,6 +174,13 @@ status_t GraphicBufferAllocator::allocate(uint32_t width, uint32_t height, } } status_t GraphicBufferAllocator::allocate(uint32_t width, uint32_t height, PixelFormat format, uint32_t layerCount, uint64_t usage, buffer_handle_t* handle, uint32_t* stride, uint64_t /*graphicBufferId*/, std::string requestorName) { return allocate(width, height, format, layerCount, usage, handle, stride, requestorName); } status_t GraphicBufferAllocator::free(buffer_handle_t handle) { ATRACE_CALL(); Loading libs/ui/include/ui/GraphicBufferAllocator.h +5 −0 Original line number Diff line number Diff line Loading @@ -42,11 +42,16 @@ class GraphicBufferAllocator : public Singleton<GraphicBufferAllocator> public: static inline GraphicBufferAllocator& get() { return getInstance(); } // DEPRECATED: GraphicBufferAllocator does not use the graphicBufferId status_t allocate(uint32_t w, uint32_t h, PixelFormat format, uint32_t layerCount, uint64_t usage, buffer_handle_t* handle, uint32_t* stride, uint64_t graphicBufferId, std::string requestorName); status_t allocate(uint32_t w, uint32_t h, PixelFormat format, uint32_t layerCount, uint64_t usage, buffer_handle_t* handle, uint32_t* stride, std::string requestorName); status_t free(buffer_handle_t handle); size_t getTotalSize() const; Loading libs/ui/include/ui/GraphicBufferMapper.h +1 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #include <memory> #include <ui/PixelFormat.h> #include <ui/Rect.h> #include <utils/Singleton.h> Loading @@ -36,7 +37,6 @@ namespace android { // --------------------------------------------------------------------------- class GrallocMapper; class Rect; class GraphicBufferMapper : public Singleton<GraphicBufferMapper> { Loading Loading
libs/ui/GraphicBufferAllocator.cpp +11 −5 Original line number Diff line number Diff line Loading @@ -111,11 +111,10 @@ void GraphicBufferAllocator::dumpToSystemLog() ALOGD("%s", s.c_str()); } status_t GraphicBufferAllocator::allocate(uint32_t width, uint32_t height, PixelFormat format, uint32_t layerCount, uint64_t usage, status_t GraphicBufferAllocator::allocate(uint32_t width, uint32_t height, PixelFormat format, uint32_t layerCount, uint64_t usage, buffer_handle_t* handle, uint32_t* stride, uint64_t /*graphicBufferId*/, std::string requestorName) { std::string requestorName) { ATRACE_CALL(); // make sure to not allocate a N x 0 or 0 x N buffer, since this is Loading Loading @@ -175,6 +174,13 @@ status_t GraphicBufferAllocator::allocate(uint32_t width, uint32_t height, } } status_t GraphicBufferAllocator::allocate(uint32_t width, uint32_t height, PixelFormat format, uint32_t layerCount, uint64_t usage, buffer_handle_t* handle, uint32_t* stride, uint64_t /*graphicBufferId*/, std::string requestorName) { return allocate(width, height, format, layerCount, usage, handle, stride, requestorName); } status_t GraphicBufferAllocator::free(buffer_handle_t handle) { ATRACE_CALL(); Loading
libs/ui/include/ui/GraphicBufferAllocator.h +5 −0 Original line number Diff line number Diff line Loading @@ -42,11 +42,16 @@ class GraphicBufferAllocator : public Singleton<GraphicBufferAllocator> public: static inline GraphicBufferAllocator& get() { return getInstance(); } // DEPRECATED: GraphicBufferAllocator does not use the graphicBufferId status_t allocate(uint32_t w, uint32_t h, PixelFormat format, uint32_t layerCount, uint64_t usage, buffer_handle_t* handle, uint32_t* stride, uint64_t graphicBufferId, std::string requestorName); status_t allocate(uint32_t w, uint32_t h, PixelFormat format, uint32_t layerCount, uint64_t usage, buffer_handle_t* handle, uint32_t* stride, std::string requestorName); status_t free(buffer_handle_t handle); size_t getTotalSize() const; Loading
libs/ui/include/ui/GraphicBufferMapper.h +1 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #include <memory> #include <ui/PixelFormat.h> #include <ui/Rect.h> #include <utils/Singleton.h> Loading @@ -36,7 +37,6 @@ namespace android { // --------------------------------------------------------------------------- class GrallocMapper; class Rect; class GraphicBufferMapper : public Singleton<GraphicBufferMapper> { Loading