Make LayerDim a regular Layer instead of a LayerBase

this is in preparation to get rid of LayerBase entirely

Change-Id: Ia051949fc5205fd87371331145356ee11598a597
diff --git a/services/surfaceflinger/LayerDim.cpp b/services/surfaceflinger/LayerDim.cpp
index 24ad706..f8c4139 100644
--- a/services/surfaceflinger/LayerDim.cpp
+++ b/services/surfaceflinger/LayerDim.cpp
@@ -34,7 +34,7 @@
 // ---------------------------------------------------------------------------
 
 LayerDim::LayerDim(SurfaceFlinger* flinger, const sp<Client>& client)
-    : LayerBase(flinger, client)
+    : Layer(flinger, client)
 {
 }
 
@@ -71,6 +71,25 @@
     }
 }
 
+sp<ISurface> LayerDim::createSurface()
+{
+    class BSurface : public BnSurface, public LayerCleaner {
+        virtual sp<IGraphicBufferProducer> getSurfaceTexture() const { return 0; }
+    public:
+        BSurface(const sp<SurfaceFlinger>& flinger,
+                const sp<LayerBase>& layer)
+            : LayerCleaner(flinger, layer) { }
+    };
+    sp<ISurface> sur(new BSurface(mFlinger, this));
+    return sur;
+}
+
+bool LayerDim::isVisible() const {
+    const Layer::State& s(mDrawingState);
+    return !(s.flags & layer_state_t::eLayerHidden) && s.alpha;
+}
+
+
 // ---------------------------------------------------------------------------
 
 }; // namespace android