Layer changes

Bug: 17208461

* Switch Layer to be VirtualLightRefBase instead of
  Caches' side-channel ref-counting
* Include active layers in gfxinfo dump
* Run gfxinfo dump on the correct thread
* Dump gfxinfo on Layer creation failure

Change-Id: I28d195699e2334518e215ab28c7a17355aee9678
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index c2c0b0e..e1c3d10 100755
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -140,7 +140,6 @@
 
     void pushLayerUpdate(Layer* layer);
     void cancelLayerUpdate(Layer* layer);
-    void clearLayerUpdates();
     void flushLayerUpdates();
     void markLayersAsBuildLayers();
 
@@ -982,7 +981,7 @@
     // List of rectangles to clear after saveLayer() is invoked
     Vector<Rect*> mLayers;
     // List of layers to update at the beginning of a frame
-    Vector<Layer*> mLayerUpdates;
+    Vector< sp<Layer> > mLayerUpdates;
 
     // The following fields are used to setup drawing
     // Used to describe the shaders to generate