From 0bde6b5a9837ab96484c988bb3f148d0b9b3ab4e Mon Sep 17 00:00:00 2001 From: Ady Abraham Date: Tue, 18 May 2021 13:57:02 -0700 Subject: SF: increase the number of buffers for SurfaceView 3 buffers are not sufficient for most apps to render at high refresh rates. This change increases the maxAcquiredBufferCount on the buffer queue for all surfaces, and removes the hwui-specific extra buffer allocations. All Surfaces connected to SurfaceFlinger will have now enough buffers to account for configured 'debug.sf.late.app.duration' value. Test: Run backpressure based game on 60Hz and 120Hz and collect traces Bug: 188553729 Change-Id: Ib8fda5db3f48c3bfc6fbf07167b4313674512cee --- libs/gui/Surface.cpp | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'libs/gui/Surface.cpp') diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp index e117d1189c..821ec16eb1 100644 --- a/libs/gui/Surface.cpp +++ b/libs/gui/Surface.cpp @@ -1501,9 +1501,6 @@ int Surface::perform(int operation, va_list args) case NATIVE_WINDOW_SET_FRAME_TIMELINE_INFO: res = dispatchSetFrameTimelineInfo(args); break; - case NATIVE_WINDOW_GET_EXTRA_BUFFER_COUNT: - res = dispatchGetExtraBufferCount(args); - break; default: res = NAME_NOT_FOUND; break; @@ -1853,14 +1850,6 @@ int Surface::dispatchSetFrameTimelineInfo(va_list args) { return setFrameTimelineInfo({frameTimelineVsyncId, inputEventId}); } -int Surface::dispatchGetExtraBufferCount(va_list args) { - ATRACE_CALL(); - auto extraBuffers = static_cast(va_arg(args, int*)); - - ALOGV("Surface::dispatchGetExtraBufferCount"); - return getExtraBufferCount(extraBuffers); -} - bool Surface::transformToDisplayInverse() const { return (mTransform & NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY) == NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY; @@ -2632,8 +2621,4 @@ status_t Surface::setFrameTimelineInfo(const FrameTimelineInfo& frameTimelineInf return composerService()->setFrameTimelineInfo(mGraphicBufferProducer, frameTimelineInfo); } -status_t Surface::getExtraBufferCount(int* extraBuffers) const { - return composerService()->getExtraBufferCount(extraBuffers); -} - }; // namespace android -- cgit v1.2.3-59-g8ed1b