Loading libs/gui/BLASTBufferQueue.cpp +11 −4 Original line number Diff line number Diff line Loading @@ -937,15 +937,22 @@ public: : Surface(igbp, controlledByApp, scHandle), mBbq(bbq) {} void allocateBuffers() override { ATRACE_CALL(); uint32_t reqWidth = mReqWidth ? mReqWidth : mUserWidth; uint32_t reqHeight = mReqHeight ? mReqHeight : mUserHeight; auto gbp = getIGraphicBufferProducer(); std::thread ([reqWidth, reqHeight, gbp=getIGraphicBufferProducer(), std::thread allocateThread([reqWidth, reqHeight, gbp = getIGraphicBufferProducer(), reqFormat = mReqFormat, reqUsage = mReqUsage]() { if (com_android_graphics_libgui_flags_allocate_buffer_priority()) { androidSetThreadName("allocateBuffers"); pid_t tid = gettid(); androidSetThreadPriority(tid, ANDROID_PRIORITY_DISPLAY); } gbp->allocateBuffers(reqWidth, reqHeight, reqFormat, reqUsage); }).detach(); }); allocateThread.detach(); } status_t setFrameRate(float frameRate, int8_t compatibility, Loading libs/gui/libgui_flags.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -142,3 +142,14 @@ flag { bug: "340934031" is_fixed_read_only: true } # wb_media_migration flag { name: "allocate_buffer_priority" namespace: "wear_system_health" description: "Boost priority for buffer allocation" bug: "399701430" metadata { purpose: PURPOSE_BUGFIX } is_fixed_read_only: true } # allocate_buffer_priority Loading
libs/gui/BLASTBufferQueue.cpp +11 −4 Original line number Diff line number Diff line Loading @@ -937,15 +937,22 @@ public: : Surface(igbp, controlledByApp, scHandle), mBbq(bbq) {} void allocateBuffers() override { ATRACE_CALL(); uint32_t reqWidth = mReqWidth ? mReqWidth : mUserWidth; uint32_t reqHeight = mReqHeight ? mReqHeight : mUserHeight; auto gbp = getIGraphicBufferProducer(); std::thread ([reqWidth, reqHeight, gbp=getIGraphicBufferProducer(), std::thread allocateThread([reqWidth, reqHeight, gbp = getIGraphicBufferProducer(), reqFormat = mReqFormat, reqUsage = mReqUsage]() { if (com_android_graphics_libgui_flags_allocate_buffer_priority()) { androidSetThreadName("allocateBuffers"); pid_t tid = gettid(); androidSetThreadPriority(tid, ANDROID_PRIORITY_DISPLAY); } gbp->allocateBuffers(reqWidth, reqHeight, reqFormat, reqUsage); }).detach(); }); allocateThread.detach(); } status_t setFrameRate(float frameRate, int8_t compatibility, Loading
libs/gui/libgui_flags.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -142,3 +142,14 @@ flag { bug: "340934031" is_fixed_read_only: true } # wb_media_migration flag { name: "allocate_buffer_priority" namespace: "wear_system_health" description: "Boost priority for buffer allocation" bug: "399701430" metadata { purpose: PURPOSE_BUGFIX } is_fixed_read_only: true } # allocate_buffer_priority