Store GrContext on RenderThread for use by Skia-based renderers.

Test: built and booted on device
Change-Id: I4c1060ec72bc67e54e6b2d25b1f2c13aaa513f89
diff --git a/libs/hwui/renderthread/RenderThread.h b/libs/hwui/renderthread/RenderThread.h
index 076e3d4..c914098 100644
--- a/libs/hwui/renderthread/RenderThread.h
+++ b/libs/hwui/renderthread/RenderThread.h
@@ -22,6 +22,7 @@
 #include "../JankTracker.h"
 #include "TimeLord.h"
 
+#include <GrContext.h>
 #include <cutils/compiler.h>
 #include <ui/DisplayInfo.h>
 #include <utils/Looper.h>
@@ -94,6 +95,9 @@
 
     const DisplayInfo& mainDisplayInfo() { return mDisplayInfo; }
 
+    GrContext* getGrContext() const { return mGrContext.get(); }
+    void setGrContext(GrContext* cxt) { mGrContext.reset(cxt); }
+
 protected:
     virtual bool threadLoop() override;
 
@@ -144,6 +148,8 @@
     EglManager* mEglManager;
 
     JankTracker* mJankTracker = nullptr;
+
+    sk_sp<GrContext> mGrContext;
 };
 
 } /* namespace renderthread */