Migrate from GrContext to GrDirectContext

This is part of an effort to distinguish between different types of
contexts in GPU Skia. When using a DeferredDisplayList (DDL)
recorder, the context you get is not a direct context and cannot
be used for operations like uploading or reading textures.

Since Android does not use DDLs, it is not directly affected by this
change but other APIs, such as SkImage::MakeFromTexture are
being migrated to require a GrDirectContext to increase sanity.

Change-Id: I9afbdf3c026a9f9cb6ad2aad904915e189e584d6
diff --git a/libs/hwui/AutoBackendTextureRelease.cpp b/libs/hwui/AutoBackendTextureRelease.cpp
index 72747e8..33264d5 100644
--- a/libs/hwui/AutoBackendTextureRelease.cpp
+++ b/libs/hwui/AutoBackendTextureRelease.cpp
@@ -25,7 +25,8 @@
 namespace android {
 namespace uirenderer {
 
-AutoBackendTextureRelease::AutoBackendTextureRelease(GrContext* context, AHardwareBuffer* buffer) {
+AutoBackendTextureRelease::AutoBackendTextureRelease(GrDirectContext* context,
+                                                     AHardwareBuffer* buffer) {
     AHardwareBuffer_Desc desc;
     AHardwareBuffer_describe(buffer, &desc);
     bool createProtectedImage = 0 != (desc.usage & AHARDWAREBUFFER_USAGE_PROTECTED_CONTENT);
@@ -67,8 +68,9 @@
     textureRelease->unref(false);
 }
 
-void AutoBackendTextureRelease::makeImage(AHardwareBuffer* buffer, android_dataspace dataspace,
-                                          GrContext* context) {
+void AutoBackendTextureRelease::makeImage(AHardwareBuffer* buffer,
+                                          android_dataspace dataspace,
+                                          GrDirectContext* context) {
     AHardwareBuffer_Desc desc;
     AHardwareBuffer_describe(buffer, &desc);
     SkColorType colorType = GrAHardwareBufferUtils::GetSkColorTypeFromBufferFormat(desc.format);
@@ -81,7 +83,7 @@
     }
 }
 
-void AutoBackendTextureRelease::newBufferContent(GrContext* context) {
+void AutoBackendTextureRelease::newBufferContent(GrDirectContext* context) {
     if (mBackendTexture.isValid()) {
         mUpdateProc(mImageCtx, context);
     }