Add GrBackendTexture & GrBackendRenderTarget access methods to GrTexture and GrRenderTarget

Change-Id: I627fcc2cab1d04169f49e33a6c17e161e9a9772a
Reviewed-on: https://skia-review.googlesource.com/84621
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp
index 4a4f085..597c213 100644
--- a/src/gpu/gl/GrGLTexture.cpp
+++ b/src/gpu/gl/GrGLTexture.cpp
@@ -9,6 +9,7 @@
 #include "GrGLGpu.h"
 #include "GrSemaphore.h"
 #include "GrShaderCaps.h"
+#include "GrTexturePriv.h"
 #include "SkTraceMemoryDump.h"
 
 #define GPUGL static_cast<GrGLGpu*>(this->getGpu())
@@ -105,6 +106,11 @@
     return reinterpret_cast<GrBackendObject>(&fInfo);
 }
 
+GrBackendTexture GrGLTexture::getBackendTexture() const {
+    return GrBackendTexture(this->width(), this->height(), this->config(),
+                            this->texturePriv().mipMapped(), fInfo);
+}
+
 void GrGLTexture::setMemoryBacking(SkTraceMemoryDump* traceMemoryDump,
                                    const SkString& dumpName) const {
     SkString texture_id;