Loading core/java/android/service/wallpaper/WallpaperService.java +3 −2 Original line number Diff line number Diff line Loading @@ -2424,9 +2424,10 @@ public abstract class WallpaperService extends Service { Surface ret = null; if (mBlastBufferQueue == null) { mBlastBufferQueue = new BLASTBufferQueue("Wallpaper", mBbqSurfaceControl, width, height, format); mBlastBufferQueue = new BLASTBufferQueue("Wallpaper", true /* updateDestinationFrame */); mBlastBufferQueue.setApplyToken(mBbqApplyToken); mBlastBufferQueue.update(mBbqSurfaceControl, width, height, format); // We only return the Surface the first time, as otherwise // it hasn't changed and there is no need to update. ret = mBlastBufferQueue.createSurface(); Loading core/java/android/view/ViewRootImpl.java +5 −4 Original line number Diff line number Diff line Loading @@ -2759,14 +2759,15 @@ public final class ViewRootImpl implements ViewParent, if (mBlastBufferQueue != null) { mBlastBufferQueue.destroy(); } mBlastBufferQueue = new BLASTBufferQueue(mTag, mSurfaceControl, mSurfaceSize.x, mSurfaceSize.y, mWindowAttributes.format); mBlastBufferQueue.setTransactionHangCallback(sTransactionHangCallback); mBlastBufferQueue.setWaitForBufferReleaseCallback(mChoreographer::onWaitForBufferRelease); mBlastBufferQueue = new BLASTBufferQueue(mTag, true /* updateDestinationFrame */); // If we create and destroy BBQ without recreating the SurfaceControl, we can end up // queuing buffers on multiple apply tokens causing out of order buffer submissions. We // fix this by setting the same apply token on all BBQs created by this VRI. mBlastBufferQueue.setApplyToken(mBbqApplyToken); mBlastBufferQueue.update(mSurfaceControl, mSurfaceSize.x, mSurfaceSize.y, mWindowAttributes.format); mBlastBufferQueue.setTransactionHangCallback(sTransactionHangCallback); mBlastBufferQueue.setWaitForBufferReleaseCallback(mChoreographer::onWaitForBufferRelease); Surface blastSurface; if (addSchandleToVriSurface()) { blastSurface = mBlastBufferQueue.createSurfaceWithHandle(); Loading Loading
core/java/android/service/wallpaper/WallpaperService.java +3 −2 Original line number Diff line number Diff line Loading @@ -2424,9 +2424,10 @@ public abstract class WallpaperService extends Service { Surface ret = null; if (mBlastBufferQueue == null) { mBlastBufferQueue = new BLASTBufferQueue("Wallpaper", mBbqSurfaceControl, width, height, format); mBlastBufferQueue = new BLASTBufferQueue("Wallpaper", true /* updateDestinationFrame */); mBlastBufferQueue.setApplyToken(mBbqApplyToken); mBlastBufferQueue.update(mBbqSurfaceControl, width, height, format); // We only return the Surface the first time, as otherwise // it hasn't changed and there is no need to update. ret = mBlastBufferQueue.createSurface(); Loading
core/java/android/view/ViewRootImpl.java +5 −4 Original line number Diff line number Diff line Loading @@ -2759,14 +2759,15 @@ public final class ViewRootImpl implements ViewParent, if (mBlastBufferQueue != null) { mBlastBufferQueue.destroy(); } mBlastBufferQueue = new BLASTBufferQueue(mTag, mSurfaceControl, mSurfaceSize.x, mSurfaceSize.y, mWindowAttributes.format); mBlastBufferQueue.setTransactionHangCallback(sTransactionHangCallback); mBlastBufferQueue.setWaitForBufferReleaseCallback(mChoreographer::onWaitForBufferRelease); mBlastBufferQueue = new BLASTBufferQueue(mTag, true /* updateDestinationFrame */); // If we create and destroy BBQ without recreating the SurfaceControl, we can end up // queuing buffers on multiple apply tokens causing out of order buffer submissions. We // fix this by setting the same apply token on all BBQs created by this VRI. mBlastBufferQueue.setApplyToken(mBbqApplyToken); mBlastBufferQueue.update(mSurfaceControl, mSurfaceSize.x, mSurfaceSize.y, mWindowAttributes.format); mBlastBufferQueue.setTransactionHangCallback(sTransactionHangCallback); mBlastBufferQueue.setWaitForBufferReleaseCallback(mChoreographer::onWaitForBufferRelease); Surface blastSurface; if (addSchandleToVriSurface()) { blastSurface = mBlastBufferQueue.createSurfaceWithHandle(); Loading