Loading cmds/servicemanager/Access.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,9 @@ constexpr bool kIsVendor = false; #ifdef __ANDROID__ static std::string getPidcon(pid_t pid) { android_errorWriteLog(0x534e4554, "121035042"); CHECK_EQ(nullptr, IPCThreadState::self()->getServingStackPointer()) << "Did not get context from PID " << pid << ". We should always get contexts from other processes."; char* lookup = nullptr; if (getpidcon(pid, &lookup) < 0) { Loading include/android/looper.h +5 −5 Original line number Diff line number Diff line Loading @@ -106,7 +106,7 @@ enum { /** * Result from ALooper_pollOnce() and ALooper_pollAll(): * An error occurred. The poll may also have been explicitly woken by * ALooper_wake(()). * ALooper_wake(). */ ALOOPER_POLL_ERROR = -4, }; Loading Loading @@ -224,11 +224,11 @@ int ALooper_pollOnce(int timeoutMillis, int* outFd, int* outEvents, void** outDa * hidden and callers should migrate to ALooper_pollOnce. Binary compatibility * is preserved to support already-compiled apps. * * \bug ALooper_pollAll will not wake in response to ALooper_wake calls if it * \bug ALooper_pollAll() will not wake in response to ALooper_wake() calls if it * also handles another event at the same time. * * \deprecated Calls to ALooper_pollAll should be replaced with * ALooper_pollOnce. If you call ALooper_pollOnce in a loop, you *must* treat * \deprecated Calls to ALooper_pollAll() should be replaced with * ALooper_pollOnce(). If you call ALooper_pollOnce() in a loop, you *must* treat * all return values as if they also indicate ALOOPER_POLL_WAKE. */ int ALooper_pollAll(int timeoutMillis, int* outFd, int* outEvents, void** outData) Loading @@ -242,7 +242,7 @@ int ALooper_pollAll(int timeoutMillis, int* outFd, int* outEvents, void** outDat * This method can be called on any thread. * This method returns immediately. * * \bug ALooper_pollAll will not reliably wake in response to ALooper_wake. * \bug ALooper_pollAll() will not reliably wake in response to ALooper_wake(). */ void ALooper_wake(ALooper* looper); Loading libs/binder/binder_module.h +0 −30 Original line number Diff line number Diff line Loading @@ -32,34 +32,4 @@ #include <linux/android/binder.h> #include <sys/ioctl.h> struct binder_frozen_state_info { binder_uintptr_t cookie; __u32 is_frozen; }; #ifndef BR_FROZEN_BINDER // Temporary definition of BR_FROZEN_BINDER until UAPI binder.h includes it. #define BR_FROZEN_BINDER _IOR('r', 21, struct binder_frozen_state_info) #endif // BR_FROZEN_BINDER #ifndef BR_CLEAR_FREEZE_NOTIFICATION_DONE // Temporary definition of BR_CLEAR_FREEZE_NOTIFICATION_DONE until UAPI binder.h includes it. #define BR_CLEAR_FREEZE_NOTIFICATION_DONE _IOR('r', 22, binder_uintptr_t) #endif // BR_CLEAR_FREEZE_NOTIFICATION_DONE #ifndef BC_REQUEST_FREEZE_NOTIFICATION // Temporary definition of BC_REQUEST_FREEZE_NOTIFICATION until UAPI binder.h includes it. #define BC_REQUEST_FREEZE_NOTIFICATION _IOW('c', 19, struct binder_handle_cookie) #endif // BC_REQUEST_FREEZE_NOTIFICATION #ifndef BC_CLEAR_FREEZE_NOTIFICATION // Temporary definition of BC_CLEAR_FREEZE_NOTIFICATION until UAPI binder.h includes it. #define BC_CLEAR_FREEZE_NOTIFICATION _IOW('c', 20, struct binder_handle_cookie) #endif // BC_CLEAR_FREEZE_NOTIFICATION #ifndef BC_FREEZE_NOTIFICATION_DONE // Temporary definition of BC_FREEZE_NOTIFICATION_DONE until UAPI binder.h includes it. #define BC_FREEZE_NOTIFICATION_DONE _IOW('c', 21, binder_uintptr_t) #endif // BC_FREEZE_NOTIFICATION_DONE #endif // _BINDER_MODULE_H_ libs/gui/BLASTBufferQueue.cpp +16 −1 Original line number Diff line number Diff line Loading @@ -1032,7 +1032,7 @@ void BLASTBufferQueue::mergeWithNextTransaction(SurfaceComposerClient::Transacti std::lock_guard _lock{mMutex}; if (mLastAcquiredFrameNumber >= frameNumber) { // Apply the transaction since we have already acquired the desired frame. t->apply(); t->setApplyToken(mApplyToken).apply(); } else { mPendingTransactions.emplace_back(frameNumber, *t); // Clear the transaction so it can't be applied elsewhere. Loading Loading @@ -1232,6 +1232,11 @@ public: return OK; } // Provide a callback for Choreographer to start buffer stuffing recovery when blocked // on buffer release. std::function<void()> callbackCopy = bbq->getWaitForBufferReleaseCallback(); if (callbackCopy) callbackCopy(); // BufferQueue has already checked if we have a free buffer. If there's an unread interrupt, // we want to ignore it. This must be done before unlocking the BufferQueue lock to ensure // we don't miss an interrupt. Loading Loading @@ -1344,6 +1349,16 @@ void BLASTBufferQueue::setApplyToken(sp<IBinder> applyToken) { mApplyToken = std::move(applyToken); } void BLASTBufferQueue::setWaitForBufferReleaseCallback(std::function<void()> callback) { std::lock_guard _lock{mWaitForBufferReleaseMutex}; mWaitForBufferReleaseCallback = std::move(callback); } std::function<void()> BLASTBufferQueue::getWaitForBufferReleaseCallback() const { std::lock_guard _lock{mWaitForBufferReleaseMutex}; return mWaitForBufferReleaseCallback; } #if COM_ANDROID_GRAPHICS_LIBGUI_FLAGS(BUFFER_RELEASE_CHANNEL) void BLASTBufferQueue::updateBufferReleaseProducer() { Loading libs/gui/Flags.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,14 @@ sp<SurfaceType> surfaceToSurfaceType(const sp<Surface>& surface) { #endif } ParcelableSurfaceType surfaceToParcelableSurfaceType(const sp<Surface>& surface) { #if WB_LIBCAMERASERVICE_WITH_DEPENDENCIES return view::Surface::fromSurface(surface); #else return surface->getIGraphicBufferProducer(); #endif } sp<IGraphicBufferProducer> surfaceTypeToIGBP(const sp<SurfaceType>& surface) { #if WB_LIBCAMERASERVICE_WITH_DEPENDENCIES return surface->getIGraphicBufferProducer(); Loading Loading
cmds/servicemanager/Access.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,9 @@ constexpr bool kIsVendor = false; #ifdef __ANDROID__ static std::string getPidcon(pid_t pid) { android_errorWriteLog(0x534e4554, "121035042"); CHECK_EQ(nullptr, IPCThreadState::self()->getServingStackPointer()) << "Did not get context from PID " << pid << ". We should always get contexts from other processes."; char* lookup = nullptr; if (getpidcon(pid, &lookup) < 0) { Loading
include/android/looper.h +5 −5 Original line number Diff line number Diff line Loading @@ -106,7 +106,7 @@ enum { /** * Result from ALooper_pollOnce() and ALooper_pollAll(): * An error occurred. The poll may also have been explicitly woken by * ALooper_wake(()). * ALooper_wake(). */ ALOOPER_POLL_ERROR = -4, }; Loading Loading @@ -224,11 +224,11 @@ int ALooper_pollOnce(int timeoutMillis, int* outFd, int* outEvents, void** outDa * hidden and callers should migrate to ALooper_pollOnce. Binary compatibility * is preserved to support already-compiled apps. * * \bug ALooper_pollAll will not wake in response to ALooper_wake calls if it * \bug ALooper_pollAll() will not wake in response to ALooper_wake() calls if it * also handles another event at the same time. * * \deprecated Calls to ALooper_pollAll should be replaced with * ALooper_pollOnce. If you call ALooper_pollOnce in a loop, you *must* treat * \deprecated Calls to ALooper_pollAll() should be replaced with * ALooper_pollOnce(). If you call ALooper_pollOnce() in a loop, you *must* treat * all return values as if they also indicate ALOOPER_POLL_WAKE. */ int ALooper_pollAll(int timeoutMillis, int* outFd, int* outEvents, void** outData) Loading @@ -242,7 +242,7 @@ int ALooper_pollAll(int timeoutMillis, int* outFd, int* outEvents, void** outDat * This method can be called on any thread. * This method returns immediately. * * \bug ALooper_pollAll will not reliably wake in response to ALooper_wake. * \bug ALooper_pollAll() will not reliably wake in response to ALooper_wake(). */ void ALooper_wake(ALooper* looper); Loading
libs/binder/binder_module.h +0 −30 Original line number Diff line number Diff line Loading @@ -32,34 +32,4 @@ #include <linux/android/binder.h> #include <sys/ioctl.h> struct binder_frozen_state_info { binder_uintptr_t cookie; __u32 is_frozen; }; #ifndef BR_FROZEN_BINDER // Temporary definition of BR_FROZEN_BINDER until UAPI binder.h includes it. #define BR_FROZEN_BINDER _IOR('r', 21, struct binder_frozen_state_info) #endif // BR_FROZEN_BINDER #ifndef BR_CLEAR_FREEZE_NOTIFICATION_DONE // Temporary definition of BR_CLEAR_FREEZE_NOTIFICATION_DONE until UAPI binder.h includes it. #define BR_CLEAR_FREEZE_NOTIFICATION_DONE _IOR('r', 22, binder_uintptr_t) #endif // BR_CLEAR_FREEZE_NOTIFICATION_DONE #ifndef BC_REQUEST_FREEZE_NOTIFICATION // Temporary definition of BC_REQUEST_FREEZE_NOTIFICATION until UAPI binder.h includes it. #define BC_REQUEST_FREEZE_NOTIFICATION _IOW('c', 19, struct binder_handle_cookie) #endif // BC_REQUEST_FREEZE_NOTIFICATION #ifndef BC_CLEAR_FREEZE_NOTIFICATION // Temporary definition of BC_CLEAR_FREEZE_NOTIFICATION until UAPI binder.h includes it. #define BC_CLEAR_FREEZE_NOTIFICATION _IOW('c', 20, struct binder_handle_cookie) #endif // BC_CLEAR_FREEZE_NOTIFICATION #ifndef BC_FREEZE_NOTIFICATION_DONE // Temporary definition of BC_FREEZE_NOTIFICATION_DONE until UAPI binder.h includes it. #define BC_FREEZE_NOTIFICATION_DONE _IOW('c', 21, binder_uintptr_t) #endif // BC_FREEZE_NOTIFICATION_DONE #endif // _BINDER_MODULE_H_
libs/gui/BLASTBufferQueue.cpp +16 −1 Original line number Diff line number Diff line Loading @@ -1032,7 +1032,7 @@ void BLASTBufferQueue::mergeWithNextTransaction(SurfaceComposerClient::Transacti std::lock_guard _lock{mMutex}; if (mLastAcquiredFrameNumber >= frameNumber) { // Apply the transaction since we have already acquired the desired frame. t->apply(); t->setApplyToken(mApplyToken).apply(); } else { mPendingTransactions.emplace_back(frameNumber, *t); // Clear the transaction so it can't be applied elsewhere. Loading Loading @@ -1232,6 +1232,11 @@ public: return OK; } // Provide a callback for Choreographer to start buffer stuffing recovery when blocked // on buffer release. std::function<void()> callbackCopy = bbq->getWaitForBufferReleaseCallback(); if (callbackCopy) callbackCopy(); // BufferQueue has already checked if we have a free buffer. If there's an unread interrupt, // we want to ignore it. This must be done before unlocking the BufferQueue lock to ensure // we don't miss an interrupt. Loading Loading @@ -1344,6 +1349,16 @@ void BLASTBufferQueue::setApplyToken(sp<IBinder> applyToken) { mApplyToken = std::move(applyToken); } void BLASTBufferQueue::setWaitForBufferReleaseCallback(std::function<void()> callback) { std::lock_guard _lock{mWaitForBufferReleaseMutex}; mWaitForBufferReleaseCallback = std::move(callback); } std::function<void()> BLASTBufferQueue::getWaitForBufferReleaseCallback() const { std::lock_guard _lock{mWaitForBufferReleaseMutex}; return mWaitForBufferReleaseCallback; } #if COM_ANDROID_GRAPHICS_LIBGUI_FLAGS(BUFFER_RELEASE_CHANNEL) void BLASTBufferQueue::updateBufferReleaseProducer() { Loading
libs/gui/Flags.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,14 @@ sp<SurfaceType> surfaceToSurfaceType(const sp<Surface>& surface) { #endif } ParcelableSurfaceType surfaceToParcelableSurfaceType(const sp<Surface>& surface) { #if WB_LIBCAMERASERVICE_WITH_DEPENDENCIES return view::Surface::fromSurface(surface); #else return surface->getIGraphicBufferProducer(); #endif } sp<IGraphicBufferProducer> surfaceTypeToIGBP(const sp<SurfaceType>& surface) { #if WB_LIBCAMERASERVICE_WITH_DEPENDENCIES return surface->getIGraphicBufferProducer(); Loading