Merge "Ensure snapshot orientation matches snapshot buffer size" into qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
c8dca90aa7
@@ -306,7 +306,8 @@ class TaskSnapshotController {
|
|||||||
final boolean isWindowTranslucent = mainWindow.getAttrs().format != PixelFormat.OPAQUE;
|
final boolean isWindowTranslucent = mainWindow.getAttrs().format != PixelFormat.OPAQUE;
|
||||||
return new TaskSnapshot(
|
return new TaskSnapshot(
|
||||||
appWindowToken.mActivityComponent, screenshotBuffer.getGraphicBuffer(),
|
appWindowToken.mActivityComponent, screenshotBuffer.getGraphicBuffer(),
|
||||||
screenshotBuffer.getColorSpace(), appWindowToken.getConfiguration().orientation,
|
screenshotBuffer.getColorSpace(),
|
||||||
|
appWindowToken.getTask().getConfiguration().orientation,
|
||||||
getInsets(mainWindow), isLowRamDevice /* reduced */, scaleFraction /* scale */,
|
getInsets(mainWindow), isLowRamDevice /* reduced */, scaleFraction /* scale */,
|
||||||
true /* isRealSnapshot */, task.getWindowingMode(), getSystemUiVisibility(task),
|
true /* isRealSnapshot */, task.getWindowingMode(), getSystemUiVisibility(task),
|
||||||
!appWindowToken.fillsParent() || isWindowTranslucent);
|
!appWindowToken.fillsParent() || isWindowTranslucent);
|
||||||
@@ -394,10 +395,11 @@ class TaskSnapshotController {
|
|||||||
if (hwBitmap == null) {
|
if (hwBitmap == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note, the app theme snapshot is never translucent because we enforce a non-translucent
|
// Note, the app theme snapshot is never translucent because we enforce a non-translucent
|
||||||
// color above
|
// color above
|
||||||
return new TaskSnapshot(topChild.mActivityComponent, hwBitmap.createGraphicBufferHandle(),
|
return new TaskSnapshot(topChild.mActivityComponent, hwBitmap.createGraphicBufferHandle(),
|
||||||
hwBitmap.getColorSpace(), topChild.getConfiguration().orientation,
|
hwBitmap.getColorSpace(), topChild.getTask().getConfiguration().orientation,
|
||||||
getInsets(mainWindow), ActivityManager.isLowRamDeviceStatic() /* reduced */,
|
getInsets(mainWindow), ActivityManager.isLowRamDeviceStatic() /* reduced */,
|
||||||
1.0f /* scale */, false /* isRealSnapshot */, task.getWindowingMode(),
|
1.0f /* scale */, false /* isRealSnapshot */, task.getWindowingMode(),
|
||||||
getSystemUiVisibility(task), false);
|
getSystemUiVisibility(task), false);
|
||||||
|
|||||||
Reference in New Issue
Block a user