super.onCreate(savedInstanceState);
getWindow().setBackgroundDrawable(new ColorDrawable(0xff000000));
FrameLayout frame = new FrameLayout(this);
final LinesView gpuView = new LinesView(this, 0, Color.GREEN);
frame.addView(gpuView);
final LinesView swView = new LinesView(this, 400, Color.RED);
swView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
frame.addView(swView);
final LinesView hwBothView = new LinesView(this, 850, Color.GREEN);
// Don't actually need to render to a hw layer, but it's a good sanity-check that
// we're rendering to/from layers correctly
hwBothView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
frame.addView(hwBothView);
final LinesView swBothView = new LinesView(this, 854, Color.RED);
swBothView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
frame.addView(swBothView);
setContentView(frame);