diff options
author | Winson Chung <winsonc@google.com> | 2017-11-13 17:45:12 -0800 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2017-11-16 09:41:46 -0800 |
commit | 11f53e96831149940d2e3df0f55752664e82c8a6 (patch) | |
tree | f85b2c18d743e56a3e58f43326c6f0cb3d915b02 /packages/SystemUI/src/com/android/systemui/OverviewProxyService.java | |
parent | e254526f0fe5d22681555bd4a00b7ee96fee1dc1 (diff) |
Minor optimizations to task loading/screenshot
- Pass graphic buffer instead of bitmap for current screenshot
- Add option to skip preloading titles
- Adding some more compat classes
Bug: 67510855
Test: Build quickstep
Change-Id: Idf4642683d3121e69f0854ac909a8c22c7238b9a
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/OverviewProxyService.java')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/OverviewProxyService.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java b/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java index 2e4a5a41bfab..22922e7bbac4 100644 --- a/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java +++ b/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java @@ -22,11 +22,8 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.ServiceConnection; -import android.graphics.Bitmap; import android.graphics.Rect; -import android.net.Uri; import android.os.Binder; -import android.os.Build; import android.os.Handler; import android.os.IBinder; import android.os.Looper; @@ -36,12 +33,14 @@ import android.os.UserHandle; import android.util.Log; import android.view.SurfaceControl; +import com.android.systemui.OverviewProxyService.OverviewProxyListener; import com.android.systemui.shared.recents.IOverviewProxy; import com.android.systemui.shared.recents.ISystemUiProxy; -import com.android.systemui.OverviewProxyService.OverviewProxyListener; +import com.android.systemui.shared.system.GraphicBufferCompat; import com.android.systemui.statusbar.policy.CallbackController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.statusbar.policy.DeviceProvisionedController.DeviceProvisionedListener; + import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.ArrayList; @@ -67,12 +66,12 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis private int mConnectionBackoffAttempts; private ISystemUiProxy mSysUiProxy = new ISystemUiProxy.Stub() { - public Bitmap screenshot(Rect sourceCrop, int width, int height, int minLayer, int maxLayer, - boolean useIdentityTransform, int rotation) { + public GraphicBufferCompat screenshot(Rect sourceCrop, int width, int height, int minLayer, + int maxLayer, boolean useIdentityTransform, int rotation) { long token = Binder.clearCallingIdentity(); try { - return SurfaceControl.screenshot(sourceCrop, width, height, minLayer, maxLayer, - useIdentityTransform, rotation); + return new GraphicBufferCompat(SurfaceControl.screenshotToBuffer(sourceCrop, width, + height, minLayer, maxLayer, useIdentityTransform, rotation)); } finally { Binder.restoreCallingIdentity(token); } |