1、
Bitmap Bmp = Bitmap.createBitmap(w, h, Config.ARGB_8888);
View decorview = this.getWindow().getDecorView();
decorview.setDrawingCacheEnabled(true);
View decorview = this.getWindow().getDecorView();
decorview.setDrawingCacheEnabled(true);
Bmp = decorview.getDrawingCache();
2、Surface.screenshot