Merge "Do not draw snapshot starting window if allocate graphic buffer fail." into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
008b3f1007
@@ -223,6 +223,11 @@ public class SnapshotDrawerUtils {
|
||||
PixelFormat.RGBA_8888,
|
||||
GraphicBuffer.USAGE_HW_TEXTURE | GraphicBuffer.USAGE_HW_COMPOSER
|
||||
| GraphicBuffer.USAGE_SW_WRITE_RARELY);
|
||||
if (background == null) {
|
||||
Log.e(TAG, "Unable to draw snapshot: failed to allocate graphic buffer for "
|
||||
+ mTitle);
|
||||
return;
|
||||
}
|
||||
// TODO: Support this on HardwareBuffer
|
||||
final Canvas c = background.lockCanvas();
|
||||
drawBackgroundAndBars(c, frame);
|
||||
|
||||
Reference in New Issue
Block a user