From fe0a413a609cda28740ab58e38d612206bd3dec9 Mon Sep 17 00:00:00 2001 From: Peter Kalauskas Date: Fri, 31 Jan 2020 16:50:42 -0800 Subject: Store original task width and height instead of scale Store the original task snapshot size instead of the scale from which the bitmap was saved. This simplifies the logic around restoring and saving from the proto, as both the reduced scale and full scale snapshots make use and share the same state. Also remove scale from TaskSnapshot, and remove and reducedScale from TaskSnapshot.Builder. Test: TaskSnapshotCacheTest Test: TaskSnapshotControllerTest Test: TaskSnapshotPersisterLoaderTest Test: TaskSnapshotSurfaceTest Bug: 148491788 Bug: 148617404 Bug: 142063079 Change-Id: I1dccaba87c3d8b95bf4156f41f9fd5d40019f675 --- proto/src/task_snapshot.proto | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'proto') diff --git a/proto/src/task_snapshot.proto b/proto/src/task_snapshot.proto index 789019ce8b75..2006fb3d7bf1 100644 --- a/proto/src/task_snapshot.proto +++ b/proto/src/task_snapshot.proto @@ -32,7 +32,12 @@ int32 system_ui_visibility = 8; bool is_translucent = 9; string top_activity_component = 10; - float scale = 11; + // deprecated because original width and height are stored now instead of the scale. + float legacy_scale = 11 [deprecated=true]; int64 id = 12; int32 rotation = 13; + // The task width when the snapshot was taken + int32 task_width = 14; + // The task height when the snapshot was taken + int32 task_height = 15; } -- cgit v1.2.3