Merge "Skip drawing snapshot if we can't create the buffer." into oc-mr1-dev
This commit is contained in:
@@ -296,7 +296,9 @@ class TaskSnapshotController {
|
|||||||
decorPainter.drawDecors(c, null /* statusBarExcludeFrame */);
|
decorPainter.drawDecors(c, null /* statusBarExcludeFrame */);
|
||||||
node.end(c);
|
node.end(c);
|
||||||
final Bitmap hwBitmap = ThreadedRenderer.createHardwareBitmap(node, width, height);
|
final Bitmap hwBitmap = ThreadedRenderer.createHardwareBitmap(node, width, height);
|
||||||
|
if (hwBitmap == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return new TaskSnapshot(hwBitmap.createGraphicBufferHandle(),
|
return new TaskSnapshot(hwBitmap.createGraphicBufferHandle(),
|
||||||
topChild.getConfiguration().orientation, mainWindow.mStableInsets,
|
topChild.getConfiguration().orientation, mainWindow.mStableInsets,
|
||||||
ActivityManager.isLowRamDeviceStatic() /* reduced */, 1.0f /* scale */);
|
ActivityManager.isLowRamDeviceStatic() /* reduced */, 1.0f /* scale */);
|
||||||
|
|||||||
Reference in New Issue
Block a user