Initial refactoring to enable the addition of the SkiaOpenGLPipeline.

Test: existing and new HWUI unit tests all pass.
Change-Id: I4f5c1dc839a2ed15d8b0f6245fe030684501b083
diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h
index 652cddd..44228f0 100644
--- a/libs/hwui/renderthread/CanvasContext.h
+++ b/libs/hwui/renderthread/CanvasContext.h
@@ -85,6 +85,12 @@
      */
     static void destroyLayer(RenderNode* node);
 
+    /*
+     * If Properties::isSkiaEnabled() is true then this will return the Skia
+     * grContext associated with the current RenderPipeline.
+     */
+    GrContext* getGrContext() const { return mRenderPipeline->getGrContext(); }
+
     // Won't take effect until next EGLSurface creation
     void setSwapBehavior(SwapBehavior swapBehavior);