Ensure there's a GL context before creating a Layer

 Bug: 13745587

Change-Id: Ib0ec059d9a5974a48734daeec9d83580cada94a3
diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h
index eb9096d..6f1c37f 100644
--- a/libs/hwui/renderthread/CanvasContext.h
+++ b/libs/hwui/renderthread/CanvasContext.h
@@ -35,6 +35,7 @@
 class DisplayListData;
 class OpenGLRenderer;
 class Rect;
+class Layer;
 
 namespace renderthread {
 
@@ -76,6 +77,9 @@
 
     void runWithGlContext(RenderTask* task);
 
+    Layer* createRenderLayer(int width, int height);
+    Layer* createTextureLayer();
+
 private:
     void setSurface(EGLNativeWindowType window);
     void swapBuffers();