rename sk_gpu_test::GLContext to sk_gpu_test::GLTestContext

rename subclasses

Fix up the EGL native GLTestContext
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1849463002

TBR=jvanverth@google.com

Committed: https://skia.googlesource.com/skia/+/4c7f0a16312c374eba4e8d5d46435ce9eb0b9971

Review URL: https://codereview.chromium.org/1849463002
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index 235de02..521824e 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -58,7 +58,7 @@
     #include "GrContextFactory.h"
     #include "gl/GrGLUtil.h"
     using sk_gpu_test::GrContextFactory;
-    using sk_gpu_test::GLContext;
+    using sk_gpu_test::GLTestContext;
     SkAutoTDelete<GrContextFactory> gGrFactory;
 #endif
 
@@ -158,7 +158,7 @@
 #if SK_SUPPORT_GPU
 struct GPUTarget : public Target {
     explicit GPUTarget(const Config& c) : Target(c), gl(nullptr) { }
-    GLContext* gl;
+    GLTestContext* gl;
 
     void setup() override {
         this->gl->makeCurrent();
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 79b9e8d..07e594b 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -71,7 +71,7 @@
 
 using namespace DM;
 using sk_gpu_test::GrContextFactory;
-using sk_gpu_test::GLContext;
+using sk_gpu_test::GLTestContext;
 
 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 
@@ -1418,7 +1418,7 @@
 namespace skiatest {
 namespace {
 typedef void(*TestWithGrContext)(skiatest::Reporter*, GrContext*);
-typedef void(*TestWithGrContextAndGLContext)(skiatest::Reporter*, GrContext*, GLContext*);
+typedef void(*TestWithGrContextAndGLContext)(skiatest::Reporter*, GrContext*, GLTestContext*);
 #if SK_SUPPORT_GPU
 template<typename T>
 void call_test(T test, skiatest::Reporter* reporter, const GrContextFactory::ContextInfo& context);
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 5bf28aa..d4cf1cc 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -39,7 +39,7 @@
 #   include "GrContext.h"
 #   include "SkGpuDevice.h"
 #   if SK_ANGLE
-#       include "gl/angle/GLContext_angle.h"
+#       include "gl/angle/GLTestContext_angle.h"
 #   endif
 #else
 class GrContext;
diff --git a/tests/EGLImageTest.cpp b/tests/EGLImageTest.cpp
index 7f0d7ea..47dad81 100644
--- a/tests/EGLImageTest.cpp
+++ b/tests/EGLImageTest.cpp
@@ -11,11 +11,11 @@
 #include "GrContextFactory.h"
 #include "gl/GrGLGpu.h"
 #include "gl/GrGLUtil.h"
-#include "gl/GLContext.h"
+#include "gl/GLTestContext.h"
 
-using sk_gpu_test::GLContext;
+using sk_gpu_test::GLTestContext;
 
-static void cleanup(GLContext* glctx0, GrGLuint texID0, GLContext* glctx1, GrContext* grctx1,
+static void cleanup(GLTestContext* glctx0, GrGLuint texID0, GLTestContext* glctx1, GrContext* grctx1,
                     const GrGLTextureInfo* grbackendtex1, GrEGLImage image1) {
     if (glctx1) {
         glctx1->makeCurrent();
@@ -93,7 +93,7 @@
         return;
     }
 
-    SkAutoTDelete<GLContext> glCtx1 = glCtx0->createNew();
+    SkAutoTDelete<GLTestContext> glCtx1 = glCtx0->createNew();
     if (!glCtx1) {
         return;
     }
diff --git a/tests/RectangleTextureTest.cpp b/tests/RectangleTextureTest.cpp
index fc9e65e..782a3b5 100644
--- a/tests/RectangleTextureTest.cpp
+++ b/tests/RectangleTextureTest.cpp
@@ -11,7 +11,7 @@
 #include "GrDrawContext.h"
 #include "gl/GrGLGpu.h"
 #include "gl/GrGLUtil.h"
-#include "gl/GLContext.h"
+#include "gl/GLTestContext.h"
 
 static void test_read_pixels(skiatest::Reporter* reporter, GrContext* context,
                              GrTexture* rectangleTexture, uint32_t expectedPixelValues[]) {
diff --git a/tests/Test.h b/tests/Test.h
index 119976f..7660c44 100644
--- a/tests/Test.h
+++ b/tests/Test.h
@@ -13,7 +13,7 @@
 
 namespace sk_gpu_test {
 class GrContextFactory;
-class GLContext;
+class GLTestContext;
 }  // namespace sk_gpu_test
 class GrContext;
 
@@ -146,7 +146,7 @@
 #define GPUTEST_SELECT(a1, a2, N, ...) N
 
 #define GPUTEST_CONTEXT_ARGS1(a1) GrContext* a1
-#define GPUTEST_CONTEXT_ARGS2(a1, a2) GrContext* a1, sk_gpu_test::GLContext* a2
+#define GPUTEST_CONTEXT_ARGS2(a1, a2) GrContext* a1, sk_gpu_test::GLTestContext* a2
 #define GPUTEST_CONTEXT_ARGS(...)                                                            \
     GPUTEST_APPLY(GPUTEST_SELECT(__VA_ARGS__, GPUTEST_CONTEXT_ARGS2, GPUTEST_CONTEXT_ARGS1), \
                   __VA_ARGS__)
diff --git a/tests/TestTest.cpp b/tests/TestTest.cpp
index 05ab9ff..d72e02d 100644
--- a/tests/TestTest.cpp
+++ b/tests/TestTest.cpp
@@ -9,7 +9,7 @@
 
 #if SK_SUPPORT_GPU
 #include "GrContext.h"
-#include "gl/GLContext.h"
+#include "gl/GLTestContext.h"
 #endif
 
 
@@ -64,7 +64,7 @@
 #endif
 
 // This is an example of a GPU test that tests a property that should work for all GPU contexts.
-// It uses the additional GLContext* glContext to implement the test.
+// It uses the additional GLTestContext* glContext to implement the test.
 #if SK_SUPPORT_GPU
 DEF_GPUTEST_FOR_ALL_CONTEXTS(TestGpuGrContextAndGLContext, reporter, context, glContext) {
     REPORTER_ASSERT(reporter, reporter);
diff --git a/tests/TextureStorageAllocator.cpp b/tests/TextureStorageAllocator.cpp
index dd08354..fbd00d3 100644
--- a/tests/TextureStorageAllocator.cpp
+++ b/tests/TextureStorageAllocator.cpp
@@ -8,7 +8,7 @@
 #include "Test.h"
 #if SK_SUPPORT_GPU
 #include "gl/GrGLGpu.h"
-#include "gl/GLContext.h"
+#include "gl/GLTestContext.h"
 #include "GrContext.h"
 #include "SkSurface_Gpu.h"
 #include "../include/gpu/GrTypes.h"
diff --git a/tools/VisualBench/VisualBench.cpp b/tools/VisualBench/VisualBench.cpp
index 578ff92..154c84b 100644
--- a/tools/VisualBench/VisualBench.cpp
+++ b/tools/VisualBench/VisualBench.cpp
@@ -118,7 +118,7 @@
 
     fInterface.reset(GrGLCreateNativeInterface());
 
-    // TODO use the GLContext creation factories and also set this all up in configs
+    // TODO use the GLTestContext creation factories and also set this all up in configs
     if (!FLAGS_nvpr) {
         fInterface.reset(GrGLInterfaceRemoveNVPR(fInterface));
     }
diff --git a/tools/VisualBench/VisualBench.h b/tools/VisualBench/VisualBench.h
index e9fbdfb..e965b09 100644
--- a/tools/VisualBench/VisualBench.h
+++ b/tools/VisualBench/VisualBench.h
@@ -16,7 +16,7 @@
 #include "SkSurface.h"
 #include "VisualFlags.h"
 #include "VisualModule.h"
-#include "gl/GLContext.h"
+#include "gl/GLTestContext.h"
 
 class GrContext;
 struct GrGLInterface;
diff --git a/tools/VisualBench/VisualStreamTimingModule.cpp b/tools/VisualBench/VisualStreamTimingModule.cpp
index 0ac698e..b572621 100644
--- a/tools/VisualBench/VisualStreamTimingModule.cpp
+++ b/tools/VisualBench/VisualStreamTimingModule.cpp
@@ -23,7 +23,7 @@
             fBenchmarkStream->current()->delayedSetup();
             // fallthrough
         case kReset_InitState:
-            // This will flicker unfortunately, but as we are reseting the GLContext each bench,
+            // This will flicker unfortunately, but as we are reseting the GLTestContext each bench,
             // we unfortunately don't have a choice
             fOwner->clear(canvas, SK_ColorWHITE, 3);
             fBenchmarkStream->current()->preTimingHooks(canvas);
diff --git a/tools/gpu/GrContextFactory.cpp b/tools/gpu/GrContextFactory.cpp
index cb23014..e5fa2c7 100755
--- a/tools/gpu/GrContextFactory.cpp
+++ b/tools/gpu/GrContextFactory.cpp
@@ -7,19 +7,19 @@
  */
 
 #include "GrContextFactory.h"
-#include "gl/GLContext.h"
+#include "gl/GLTestContext.h"
 
 #if SK_ANGLE
-    #include "gl/angle/GLContext_angle.h"
+    #include "gl/angle/GLTestContext_angle.h"
 #endif
 #if SK_COMMAND_BUFFER
-    #include "gl/command_buffer/GLContext_command_buffer.h"
+    #include "gl/command_buffer/GLTestContext_command_buffer.h"
 #endif
-#include "gl/debug/DebugGLContext.h"
+#include "gl/debug/DebugGLTestContext.h"
 #if SK_MESA
-    #include "gl/mesa/GLContext_mesa.h"
+    #include "gl/mesa/GLTestContext_mesa.h"
 #endif
-#include "gl/null/NullGLContext.h"
+#include "gl/null/NullGLTestContext.h"
 #include "gl/GrGLGpu.h"
 #include "GrCaps.h"
 
@@ -73,43 +73,43 @@
             return ContextInfo(context.fGrContext, context.fGLContext);
         }
     }
-    SkAutoTDelete<GLContext> glCtx;
+    SkAutoTDelete<GLTestContext> glCtx;
     SkAutoTUnref<GrContext> grCtx;
     switch (type) {
         case kNative_GLContextType:
-            glCtx.reset(CreatePlatformGLContext(kNone_GrGLStandard));
+            glCtx.reset(CreatePlatformGLTestContext(kNone_GrGLStandard));
             break;
         case kGL_GLContextType:
-            glCtx.reset(CreatePlatformGLContext(kGL_GrGLStandard));
+            glCtx.reset(CreatePlatformGLTestContext(kGL_GrGLStandard));
             break;
         case kGLES_GLContextType:
-            glCtx.reset(CreatePlatformGLContext(kGLES_GrGLStandard));
+            glCtx.reset(CreatePlatformGLTestContext(kGLES_GrGLStandard));
             break;
 #if SK_ANGLE
 #ifdef SK_BUILD_FOR_WIN
         case kANGLE_GLContextType:
-            glCtx.reset(CreateANGLEDirect3DGLContext());
+            glCtx.reset(CreateANGLEDirect3DGLTestContext());
             break;
 #endif
         case kANGLE_GL_GLContextType:
-            glCtx.reset(CreateANGLEOpenGLGLContext());
+            glCtx.reset(CreateANGLEOpenGLGLTestContext());
             break;
 #endif
 #if SK_COMMAND_BUFFER
         case kCommandBuffer_GLContextType:
-            glCtx.reset(CommandBufferGLContext::Create());
+            glCtx.reset(CommandBufferGLTestContext::Create());
             break;
 #endif
 #if SK_MESA
         case kMESA_GLContextType:
-            glCtx.reset(CreateMesaGLContext());
+            glCtx.reset(CreateMesaGLTestContext());
             break;
 #endif
         case kNull_GLContextType:
-            glCtx.reset(CreateNullGLContext());
+            glCtx.reset(CreateNullGLTestContext());
             break;
         case kDebug_GLContextType:
-            glCtx.reset(CreateDebugGLContext());
+            glCtx.reset(CreateDebugGLTestContext());
             break;
     }
     if (nullptr == glCtx.get()) {
diff --git a/tools/gpu/GrContextFactory.h b/tools/gpu/GrContextFactory.h
index b174608..14a2739 100644
--- a/tools/gpu/GrContextFactory.h
+++ b/tools/gpu/GrContextFactory.h
@@ -11,7 +11,7 @@
 #include "GrContext.h"
 #include "GrContextOptions.h"
 
-#include "gl/GLContext.h"
+#include "gl/GLTestContext.h"
 #include "SkTArray.h"
 
 namespace sk_gpu_test {
@@ -111,10 +111,10 @@
     struct ContextInfo {
         ContextInfo()
             : fGrContext(nullptr), fGLContext(nullptr) { }
-        ContextInfo(GrContext* grContext, GLContext* glContext)
+        ContextInfo(GrContext* grContext, GLTestContext* glContext)
             : fGrContext(grContext), fGLContext(glContext) { }
         GrContext* fGrContext;
-        GLContext* fGLContext; //! Valid until the factory destroys it via abandonContexts() or
+        GLTestContext* fGLContext; //! Valid until the factory destroys it via abandonContexts() or
                                //! destroyContexts().
     };
 
@@ -136,7 +136,7 @@
     struct Context {
         GLContextType       fType;
         GLContextOptions    fOptions;
-        GLContext*          fGLContext;
+        GLTestContext*          fGLContext;
         GrContext*          fGrContext;
     };
     SkTArray<Context, true> fContexts;
diff --git a/tools/gpu/gl/GLContext.cpp b/tools/gpu/gl/GLTestContext.cpp
similarity index 86%
rename from tools/gpu/gl/GLContext.cpp
rename to tools/gpu/gl/GLTestContext.cpp
index ac0e310..1069929 100644
--- a/tools/gpu/gl/GLContext.cpp
+++ b/tools/gpu/gl/GLTestContext.cpp
@@ -5,14 +5,14 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
-#include "GLContext.h"
+#include "GLTestContext.h"
 #include "gl/GrGLUtil.h"
 #include "SkGpuFenceSync.h"
 
 namespace sk_gpu_test {
-class GLContext::GLFenceSync : public SkGpuFenceSync {
+class GLTestContext::GLFenceSync : public SkGpuFenceSync {
 public:
-    static GLFenceSync* CreateIfSupported(const GLContext*);
+    static GLFenceSync* CreateIfSupported(const GLTestContext*);
 
     SkPlatformGpuFence SK_WARN_UNUSED_RESULT insertFence() const override;
     bool waitFence(SkPlatformGpuFence fence, bool flush) const override;
@@ -38,12 +38,12 @@
     typedef SkGpuFenceSync INHERITED;
 };
 
-GLContext::GLContext()
+GLTestContext::GLTestContext()
     : fCurrentFenceIdx(0) {
     memset(fFrameFences, 0, sizeof(fFrameFences));
 }
 
-GLContext::~GLContext() {
+GLTestContext::~GLTestContext() {
     // Subclass should call teardown.
 #ifdef SK_DEBUG
     for (size_t i = 0; i < SK_ARRAY_COUNT(fFrameFences); i++) {
@@ -54,13 +54,13 @@
     SkASSERT(nullptr == fFenceSync.get());
 }
 
-void GLContext::init(const GrGLInterface* gl, SkGpuFenceSync* fenceSync) {
+void GLTestContext::init(const GrGLInterface* gl, SkGpuFenceSync* fenceSync) {
     SkASSERT(!fGL.get());
     fGL.reset(gl);
     fFenceSync.reset(fenceSync ? fenceSync : GLFenceSync::CreateIfSupported(this));
 }
 
-void GLContext::teardown() {
+void GLTestContext::teardown() {
     if (fFenceSync) {
         for (size_t i = 0; i < SK_ARRAY_COUNT(fFrameFences); i++) {
             if (fFrameFences[i]) {
@@ -74,15 +74,15 @@
     fGL.reset(nullptr);
 }
 
-void GLContext::makeCurrent() const {
+void GLTestContext::makeCurrent() const {
     this->onPlatformMakeCurrent();
 }
 
-void GLContext::swapBuffers() {
+void GLTestContext::swapBuffers() {
     this->onPlatformSwapBuffers();
 }
 
-void GLContext::waitOnSyncOrSwap() {
+void GLTestContext::waitOnSyncOrSwap() {
     if (!fFenceSync) {
         // Fallback on the platform SwapBuffers method for synchronization. This may have no effect.
         this->swapBuffers();
@@ -100,7 +100,7 @@
     fCurrentFenceIdx = (fCurrentFenceIdx + 1) % SK_ARRAY_COUNT(fFrameFences);
 }
 
-void GLContext::testAbandon() {
+void GLTestContext::testAbandon() {
     if (fGL) {
         fGL->abandon();
     }
@@ -109,7 +109,7 @@
     }
 }
 
-GLContext::GLFenceSync* GLContext::GLFenceSync::CreateIfSupported(const GLContext* ctx) {
+GLTestContext::GLFenceSync* GLTestContext::GLFenceSync::CreateIfSupported(const GLTestContext* ctx) {
     SkAutoTDelete<GLFenceSync> ret(new GLFenceSync);
 
     if (kGL_GrGLStandard == ctx->gl()->fStandard) {
@@ -144,21 +144,21 @@
     return ret.release();
 }
 
-SkPlatformGpuFence GLContext::GLFenceSync::insertFence() const {
+SkPlatformGpuFence GLTestContext::GLFenceSync::insertFence() const {
     return fGLFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
 }
 
-bool GLContext::GLFenceSync::waitFence(SkPlatformGpuFence fence, bool flush) const {
+bool GLTestContext::GLFenceSync::waitFence(SkPlatformGpuFence fence, bool flush) const {
     GLsync glsync = static_cast<GLsync>(fence);
     return GL_WAIT_FAILED != fGLClientWaitSync(glsync, flush ? GL_SYNC_FLUSH_COMMANDS_BIT : 0, -1);
 }
 
-void GLContext::GLFenceSync::deleteFence(SkPlatformGpuFence fence) const {
+void GLTestContext::GLFenceSync::deleteFence(SkPlatformGpuFence fence) const {
     GLsync glsync = static_cast<GLsync>(fence);
     fGLDeleteSync(glsync);
 }
 
-GrGLint GLContext::createTextureRectangle(int width, int height, GrGLenum internalFormat,
+GrGLint GLTestContext::createTextureRectangle(int width, int height, GrGLenum internalFormat,
                                           GrGLenum externalFormat, GrGLenum externalType,
                                           GrGLvoid* data) {
     if (!(kGL_GrGLStandard == fGL->fStandard && GrGLGetVersion(fGL) >= GR_GL_VER(3, 1)) &&
diff --git a/tools/gpu/gl/GLContext.h b/tools/gpu/gl/GLTestContext.h
similarity index 88%
rename from tools/gpu/gl/GLContext.h
rename to tools/gpu/gl/GLTestContext.h
index 3f47613..d6054a8 100644
--- a/tools/gpu/gl/GLContext.h
+++ b/tools/gpu/gl/GLTestContext.h
@@ -5,8 +5,8 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
-#ifndef GLContext_DEFINED
-#define GLContext_DEFINED
+#ifndef GLTestContext_DEFINED
+#define GLTestContext_DEFINED
 
 #include "gl/GrGLInterface.h"
 #include "../private/SkGpuFenceSync.h"
@@ -17,9 +17,9 @@
  * Create an offscreen Oppengl context. Provides a GrGLInterface struct of function pointers for
  * the context. This class is intended for Skia's internal testing needs and not for general use.
  */
-class GLContext : public SkNoncopyable {
+class GLTestContext : public SkNoncopyable {
 public:
-    virtual ~GLContext();
+    virtual ~GLTestContext();
 
     bool isValid() const { return NULL != gl(); }
 
@@ -82,17 +82,17 @@
      * Creates a new GL context of the same type and makes the returned context current
      * (if not null).
      */
-    virtual GLContext *createNew() const { return nullptr; }
+    virtual GLTestContext *createNew() const { return nullptr; }
 
     class GLFenceSync;  // SkGpuFenceSync implementation that uses the OpenGL functionality.
 
     /*
-     * returns the fencesync object owned by this GLContext
+     * returns the fencesync object owned by this GLTestContext
      */
     SkGpuFenceSync *fenceSync() { return fFenceSync.get(); }
 
 protected:
-    GLContext();
+    GLTestContext();
 
     /*
      * Methods that sublcasses must call from their constructors and destructors.
@@ -128,14 +128,14 @@
 
 
 /** Creates platform-dependent GL context object.  The shareContext parameter is in an optional
- * context with which to share display lists. This should be a pointer to an GLContext created
- * with SkCreatePlatformGLContext.  NULL indicates that no sharing is to take place. Returns a valid
+ * context with which to share display lists. This should be a pointer to an GLTestContext created
+ * with SkCreatePlatformGLTestContext.  NULL indicates that no sharing is to take place. Returns a valid
  * gl context object or NULL if such can not be created.
  * Note: If Skia embedder needs a custom GL context that sets up the GL interface, this function
  * should be implemented by the embedder. Otherwise, the default implementation for the platform
  * should be compiled in the library.
  */
-GLContext* CreatePlatformGLContext(GrGLStandard forcedGpuAPI, GLContext *shareContext = nullptr);
+GLTestContext* CreatePlatformGLTestContext(GrGLStandard forcedGpuAPI, GLTestContext *shareContext = nullptr);
 
 }  // namespace sk_gpu_test
 #endif
diff --git a/tools/gpu/gl/angle/GLContext_angle.h b/tools/gpu/gl/angle/GLContext_angle.h
deleted file mode 100644
index 519ea6b..0000000
--- a/tools/gpu/gl/angle/GLContext_angle.h
+++ /dev/null
@@ -1,30 +0,0 @@
-
-/*
- * Copyright 2012 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-#ifndef GLContext_angle_DEFINED
-#define GLContext_angle_DEFINED
-
-#include "gl/GLContext.h"
-
-namespace sk_gpu_test {
-
-/**
- * Creates a GrGLInterface for the currently ANGLE GL context currently bound in ANGLE's EGL
- * implementation.
- */
-const GrGLInterface* CreateANGLEGLInterface();
-
-#ifdef SK_BUILD_FOR_WIN
-/** Creates a GLContext backed by ANGLE's Direct3D backend. */
-GLContext* CreateANGLEDirect3DGLContext();
-#endif
-
-/** Creates a GLContext backed by ANGLE's OpenGL backend. */
-GLContext* CreateANGLEOpenGLGLContext();
-
-}  // namespace sk_gpu_test
-#endif
diff --git a/tools/gpu/gl/angle/GLContext_angle.cpp b/tools/gpu/gl/angle/GLTestContext_angle.cpp
similarity index 93%
rename from tools/gpu/gl/angle/GLContext_angle.cpp
rename to tools/gpu/gl/angle/GLTestContext_angle.cpp
index f1e8aad..0b4aae9 100644
--- a/tools/gpu/gl/angle/GLContext_angle.cpp
+++ b/tools/gpu/gl/angle/GLTestContext_angle.cpp
@@ -6,7 +6,7 @@
  * found in the LICENSE file.
  */
 
-#include "GLContext_angle.h"
+#include "GLTestContext_angle.h"
 
 #include <EGL/egl.h>
 #include <EGL/eglext.h>
@@ -84,7 +84,7 @@
     return display;
 }
 
-class ANGLEGLContext : public sk_gpu_test::GLContext {
+class ANGLEGLContext : public sk_gpu_test::GLTestContext {
 public:
     ANGLEGLContext(bool preferGLBackend);
     ~ANGLEGLContext() override;
@@ -92,7 +92,7 @@
     GrEGLImage texture2DToEGLImage(GrGLuint texID) const override;
     void destroyEGLImage(GrEGLImage) const override;
     GrGLuint eglImageToExternalTexture(GrEGLImage) const override;
-    sk_gpu_test::GLContext* createNew() const override;
+    sk_gpu_test::GLTestContext* createNew() const override;
 
 private:
     void destroyGLContext();
@@ -223,12 +223,13 @@
     return texID;
 }
 
-sk_gpu_test::GLContext* ANGLEGLContext::createNew() const {
+sk_gpu_test::GLTestContext* ANGLEGLContext::createNew() const {
 #ifdef SK_BUILD_FOR_WIN
-    sk_gpu_test::GLContext* ctx = fIsGLBackend ? sk_gpu_test::CreateANGLEOpenGLGLContext()
-                                               : sk_gpu_test::CreateANGLEDirect3DGLContext();
+    sk_gpu_test::GLTestContext* ctx = fIsGLBackend?
+        ? sk_gpu_test::CreateANGLEOpenGLGLTestContext()
+        : sk_gpu_test::CreateANGLEDirect3DGLTestContext();
 #else
-    sk_gpu_test::GLContext* ctx = sk_gpu_test::CreateANGLEOpenGLGLContext();
+    sk_gpu_test::GLTestContext* ctx = sk_gpu_test::CreateANGLEOpenGLGLTestContext();
 #endif
     if (ctx) {
         ctx->makeCurrent();
@@ -299,7 +300,7 @@
 }
 
 #ifdef SK_BUILD_FOR_WIN
-GLContext* CreateANGLEDirect3DGLContext() {
+GLTestContext* CreateANGLEDirect3DGLTestContext() {
         ANGLEGLContext* ctx = new ANGLEGLContext(false);
         if (!ctx->isValid()) {
             delete ctx;
@@ -309,7 +310,7 @@
     }
 #endif
 
-GLContext* CreateANGLEOpenGLGLContext() {
+GLTestContext* CreateANGLEOpenGLGLTestContext() {
     ANGLEGLContext* ctx = new ANGLEGLContext(true);
     if (!ctx->isValid()) {
         delete ctx;
diff --git a/tools/gpu/gl/angle/GLTestContext_angle.h b/tools/gpu/gl/angle/GLTestContext_angle.h
new file mode 100644
index 0000000..0140477
--- /dev/null
+++ b/tools/gpu/gl/angle/GLTestContext_angle.h
@@ -0,0 +1,30 @@
+
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+#ifndef GLTestContext_angle_DEFINED
+#define GLTestContext_angle_DEFINED
+
+#include "gl/GLTestContext.h"
+
+namespace sk_gpu_test {
+
+/**
+ * Creates a GrGLInterface for the currently ANGLE GL context currently bound in ANGLE's EGL
+ * implementation.
+ */
+const GrGLInterface* CreateANGLEGLInterface();
+
+#ifdef SK_BUILD_FOR_WIN
+/** Creates a GLTestContext backed by ANGLE's Direct3D backend. */
+GLTestContext* CreateANGLEDirect3DGLTestContext();
+#endif
+
+/** Creates a GLTestContext backed by ANGLE's OpenGL backend. */
+GLTestContext* CreateANGLEOpenGLGLTestContext();
+
+}  // namespace sk_gpu_test
+#endif
diff --git a/tools/gpu/gl/command_buffer/GLContext_command_buffer.cpp b/tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp
similarity index 93%
rename from tools/gpu/gl/command_buffer/GLContext_command_buffer.cpp
rename to tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp
index b878cb4..5985a2e 100644
--- a/tools/gpu/gl/command_buffer/GLContext_command_buffer.cpp
+++ b/tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp
@@ -9,7 +9,7 @@
 #include "SkOnce.h"
 #include "gl/GrGLInterface.h"
 #include "gl/GrGLAssembleInterface.h"
-#include "gl/command_buffer/GLContext_command_buffer.h"
+#include "gl/command_buffer/GLTestContext_command_buffer.h"
 #include "../ports/SkOSEnvironment.h"
 #include "../ports/SkOSLibrary.h"
 
@@ -143,7 +143,7 @@
 
 namespace sk_gpu_test {
 
-CommandBufferGLContext::CommandBufferGLContext()
+CommandBufferGLTestContext::CommandBufferGLTestContext()
     : fContext(EGL_NO_CONTEXT), fDisplay(EGL_NO_DISPLAY), fSurface(EGL_NO_SURFACE) {
 
     static const EGLint configAttribs[] = {
@@ -165,7 +165,7 @@
     initializeGLContext(nullptr, configAttribs, surfaceAttribs);
 }
 
-CommandBufferGLContext::CommandBufferGLContext(void *nativeWindow, int msaaSampleCount) {
+CommandBufferGLTestContext::CommandBufferGLTestContext(void *nativeWindow, int msaaSampleCount) {
     static const EGLint surfaceAttribs[] = {EGL_NONE};
 
     EGLint configAttribs[] = {
@@ -186,7 +186,7 @@
     initializeGLContext(nativeWindow, configAttribs, surfaceAttribs);
 }
 
-void CommandBufferGLContext::initializeGLContext(void *nativeWindow, const int *configAttribs,
+void CommandBufferGLTestContext::initializeGLContext(void *nativeWindow, const int *configAttribs,
                                                  const int *surfaceAttribs) {
     load_command_buffer_once();
     if (!gfFunctionsLoadedSuccessfully) {
@@ -266,12 +266,12 @@
     this->init(gl.release());
 }
 
-CommandBufferGLContext::~CommandBufferGLContext() {
+CommandBufferGLTestContext::~CommandBufferGLTestContext() {
     this->teardown();
     this->destroyGLContext();
 }
 
-void CommandBufferGLContext::destroyGLContext() {
+void CommandBufferGLTestContext::destroyGLContext() {
     if (!gfFunctionsLoadedSuccessfully) {
         return;
     }
@@ -293,7 +293,7 @@
     }
 }
 
-void CommandBufferGLContext::onPlatformMakeCurrent() const {
+void CommandBufferGLTestContext::onPlatformMakeCurrent() const {
     if (!gfFunctionsLoadedSuccessfully) {
         return;
     }
@@ -302,7 +302,7 @@
     }
 }
 
-void CommandBufferGLContext::onPlatformSwapBuffers() const {
+void CommandBufferGLTestContext::onPlatformSwapBuffers() const {
     if (!gfFunctionsLoadedSuccessfully) {
         return;
     }
@@ -311,14 +311,14 @@
     }
 }
 
-GrGLFuncPtr CommandBufferGLContext::onPlatformGetProcAddress(const char *name) const {
+GrGLFuncPtr CommandBufferGLTestContext::onPlatformGetProcAddress(const char *name) const {
     if (!gfFunctionsLoadedSuccessfully) {
         return nullptr;
     }
     return gfGetProcAddress(name);
 }
 
-void CommandBufferGLContext::presentCommandBuffer() {
+void CommandBufferGLTestContext::presentCommandBuffer() {
     if (this->gl()) {
         this->gl()->fFunctions.fFlush();
     }
@@ -326,17 +326,17 @@
     this->onPlatformSwapBuffers();
 }
 
-bool CommandBufferGLContext::makeCurrent() {
+bool CommandBufferGLTestContext::makeCurrent() {
     return gfMakeCurrent(fDisplay, fSurface, fSurface, fContext) != EGL_FALSE;
 }
 
-int CommandBufferGLContext::getStencilBits() {
+int CommandBufferGLTestContext::getStencilBits() {
     EGLint result = 0;
     gfGetConfigAttrib(fDisplay, static_cast<EGLConfig>(fConfig), EGL_STENCIL_SIZE, &result);
     return result;
 }
 
-int CommandBufferGLContext::getSampleCount() {
+int CommandBufferGLTestContext::getSampleCount() {
     EGLint result = 0;
     gfGetConfigAttrib(fDisplay, static_cast<EGLConfig>(fConfig), EGL_SAMPLES, &result);
     return result;
diff --git a/tools/gpu/gl/command_buffer/GLContext_command_buffer.h b/tools/gpu/gl/command_buffer/GLTestContext_command_buffer.h
similarity index 61%
rename from tools/gpu/gl/command_buffer/GLContext_command_buffer.h
rename to tools/gpu/gl/command_buffer/GLTestContext_command_buffer.h
index 73f02e2..0994c98 100644
--- a/tools/gpu/gl/command_buffer/GLContext_command_buffer.h
+++ b/tools/gpu/gl/command_buffer/GLTestContext_command_buffer.h
@@ -6,18 +6,18 @@
  * found in the LICENSE file.
  */
 
-#ifndef GLContext_command_buffer_DEFINED
-#define GLContext_command_buffer_DEFINED
+#ifndef GLTestContext_command_buffer_DEFINED
+#define GLTestContext_command_buffer_DEFINED
 
-#include "gl/GLContext.h"
+#include "gl/GLTestContext.h"
 
 namespace sk_gpu_test {
-class CommandBufferGLContext : public GLContext {
+class CommandBufferGLTestContext : public GLTestContext {
 public:
-    ~CommandBufferGLContext() override;
+    ~CommandBufferGLTestContext() override;
 
-    static CommandBufferGLContext *Create() {
-        CommandBufferGLContext *ctx = new CommandBufferGLContext;
+    static CommandBufferGLTestContext *Create() {
+        CommandBufferGLTestContext *ctx = new CommandBufferGLTestContext;
         if (!ctx->isValid()) {
             delete ctx;
             return nullptr;
@@ -25,8 +25,8 @@
         return ctx;
     }
 
-    static CommandBufferGLContext *Create(void *nativeWindow, int msaaSampleCount) {
-        CommandBufferGLContext *ctx = new CommandBufferGLContext(nativeWindow, msaaSampleCount);
+    static CommandBufferGLTestContext *Create(void *nativeWindow, int msaaSampleCount) {
+        CommandBufferGLTestContext *ctx = new CommandBufferGLTestContext(nativeWindow, msaaSampleCount);
         if (!ctx->isValid()) {
             delete ctx;
             return nullptr;
@@ -43,9 +43,9 @@
     int getSampleCount();
 
 private:
-    CommandBufferGLContext();
+    CommandBufferGLTestContext();
 
-    CommandBufferGLContext(void *nativeWindow, int msaaSampleCount);
+    CommandBufferGLTestContext(void *nativeWindow, int msaaSampleCount);
 
     void initializeGLContext(void *nativeWindow, const int *configAttribs,
                              const int *surfaceAttribs);
diff --git a/tools/gpu/gl/debug/DebugGLContext.cpp b/tools/gpu/gl/debug/DebugGLTestContext.cpp
similarity index 99%
rename from tools/gpu/gl/debug/DebugGLContext.cpp
rename to tools/gpu/gl/debug/DebugGLTestContext.cpp
index f4cbbea..96640c5 100644
--- a/tools/gpu/gl/debug/DebugGLContext.cpp
+++ b/tools/gpu/gl/debug/DebugGLTestContext.cpp
@@ -6,7 +6,7 @@
  * found in the LICENSE file.
  */
 
-#include "DebugGLContext.h"
+#include "DebugGLTestContext.h"
 
 #include "GrBufferObj.h"
 #include "GrFrameBufferObj.h"
@@ -1229,7 +1229,7 @@
     nullptr, // signifies the end of the array.
 };
 
-class DebugGLContext : public sk_gpu_test::GLContext {
+class DebugGLContext : public sk_gpu_test::GLTestContext {
 public:
    DebugGLContext() {
        this->init(new DebugInterface());
@@ -1245,8 +1245,8 @@
 }  // anonymous namespace
 
 namespace sk_gpu_test {
-GLContext* CreateDebugGLContext() {
-    GLContext* ctx = new DebugGLContext();
+GLTestContext* CreateDebugGLTestContext() {
+    GLTestContext* ctx = new DebugGLContext();
     if (ctx->isValid()) {
         return ctx;
     }
diff --git a/tools/gpu/gl/debug/DebugGLContext.h b/tools/gpu/gl/debug/DebugGLTestContext.h
similarity index 78%
rename from tools/gpu/gl/debug/DebugGLContext.h
rename to tools/gpu/gl/debug/DebugGLTestContext.h
index 0ac505b..3f2646b 100644
--- a/tools/gpu/gl/debug/DebugGLContext.h
+++ b/tools/gpu/gl/debug/DebugGLTestContext.h
@@ -8,10 +8,10 @@
 #ifndef DebugGLContext_DEFINED
 #define DebugGLContext_DEFINED
 
-#include "gl/GLContext.h"
+#include "gl/GLTestContext.h"
 
 namespace sk_gpu_test {
-GLContext* CreateDebugGLContext();
+GLTestContext* CreateDebugGLTestContext();
 }  // namespace sk_gpu_test
 
 #endif
diff --git a/tools/gpu/gl/egl/CreatePlatformGLContext_egl.cpp b/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp
similarity index 83%
rename from tools/gpu/gl/egl/CreatePlatformGLContext_egl.cpp
rename to tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp
index ac2e7ca..ae61b33 100644
--- a/tools/gpu/gl/egl/CreatePlatformGLContext_egl.cpp
+++ b/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp
@@ -5,8 +5,9 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
-#include "gl/GLContext.h"
+#include "gl/GLTestContext.h"
 
+#define GL_GLEXT_PROTOTYPES
 #include <GLES2/gl2.h>
 
 #define EGL_EGLEXT_PROTOTYPES
@@ -19,31 +20,31 @@
 namespace {
 
 // TODO: Share this class with ANGLE if/when it gets support for EGL_KHR_fence_sync.
-class SkEGLFenceSync : public SkGpuFenceSync {
+class EGLFenceSync : public SkGpuFenceSync {
 public:
-    static SkEGLFenceSync* CreateIfSupported(EGLDisplay);
+    static EGLFenceSync* CreateIfSupported(EGLDisplay);
 
     SkPlatformGpuFence SK_WARN_UNUSED_RESULT insertFence() const override;
     bool waitFence(SkPlatformGpuFence fence, bool flush) const override;
     void deleteFence(SkPlatformGpuFence fence) const override;
 
 private:
-    SkEGLFenceSync(EGLDisplay display) : fDisplay(display) {}
+    EGLFenceSync(EGLDisplay display) : fDisplay(display) {}
 
     EGLDisplay                    fDisplay;
 
     typedef SkGpuFenceSync INHERITED;
 };
 
-class EGLGLContext : public sk_gpu_test::GLContext {
+class EGLGLTestContext : public sk_gpu_test::GLTestContext {
 public:
-    EGLGLContext(GrGLStandard forcedGpuAPI);
-    ~EGLGLContext() override;
+    EGLGLTestContext(GrGLStandard forcedGpuAPI);
+    ~EGLGLTestContext() override;
 
     GrEGLImage texture2DToEGLImage(GrGLuint texID) const override;
     void destroyEGLImage(GrEGLImage) const override;
     GrGLuint eglImageToExternalTexture(GrEGLImage) const override;
-    sk_gpu_test::GLContext* createNew() const override;
+    sk_gpu_test::GLTestContext* createNew() const override;
 
 private:
     void destroyGLContext();
@@ -57,7 +58,7 @@
     EGLSurface fSurface;
 };
 
-EGLGLContext::EGLGLContext(GrGLStandard forcedGpuAPI)
+EGLGLTestContext::EGLGLTestContext(GrGLStandard forcedGpuAPI)
     : fContext(EGL_NO_CONTEXT)
     , fDisplay(EGL_NO_DISPLAY)
     , fSurface(EGL_NO_SURFACE) {
@@ -179,17 +180,17 @@
             continue;
         }
 
-        this->init(gl.release(), SkEGLFenceSync::CreateIfSupported(fDisplay));
+        this->init(gl.release(), EGLFenceSync::CreateIfSupported(fDisplay));
         break;
     }
 }
 
-EGLGLContext::~EGLGLContext() {
+EGLGLTestContext::~EGLGLTestContext() {
     this->teardown();
     this->destroyGLContext();
 }
 
-void EGLGLContext::destroyGLContext() {
+void EGLGLTestContext::destroyGLContext() {
     if (fDisplay) {
         eglMakeCurrent(fDisplay, 0, 0, 0);
 
@@ -208,7 +209,7 @@
     }
 }
 
-GrEGLImage EGLGLContext::texture2DToEGLImage(GrGLuint texID) const {
+GrEGLImage EGLGLTestContext::texture2DToEGLImage(GrGLuint texID) const {
     if (!this->gl()->hasExtension("EGL_KHR_gl_texture_2D_image")) {
         return GR_EGL_NO_IMAGE;
     }
@@ -220,11 +221,11 @@
     return img;
 }
 
-void EGLGLContext::destroyEGLImage(GrEGLImage image) const {
+void EGLGLTestContext::destroyEGLImage(GrEGLImage image) const {
     GR_GL_CALL(this->gl(), EGLDestroyImage(fDisplay, image));
 }
 
-GrGLuint EGLGLContext::eglImageToExternalTexture(GrEGLImage image) const {
+GrGLuint EGLGLTestContext::eglImageToExternalTexture(GrEGLImage image) const {
     GrGLClearErr(this->gl());
     if (!this->gl()->hasExtension("GL_OES_EGL_image_external")) {
         return 0;
@@ -254,27 +255,27 @@
     return texID;
 }
 
-sk_gpu_test::GLContext* EGLGLContext::createNew() const {
-    sk_gpu_test::GLContext* ctx = new EGLGLContext(this->gl()->fStandard);
+sk_gpu_test::GLTestContext* EGLGLTestContext::createNew() const {
+    sk_gpu_test::GLTestContext* ctx = new EGLGLTestContext(this->gl()->fStandard);
     if (ctx) {
         ctx->makeCurrent();
     }
     return ctx;
 }
 
-void EGLGLContext::onPlatformMakeCurrent() const {
+void EGLGLTestContext::onPlatformMakeCurrent() const {
     if (!eglMakeCurrent(fDisplay, fSurface, fSurface, fContext)) {
         SkDebugf("Could not set the context.\n");
     }
 }
 
-void EGLGLContext::onPlatformSwapBuffers() const {
+void EGLGLTestContext::onPlatformSwapBuffers() const {
     if (!eglSwapBuffers(fDisplay, fSurface)) {
         SkDebugf("Could not complete eglSwapBuffers.\n");
     }
 }
 
-GrGLFuncPtr EGLGLContext::onPlatformGetProcAddress(const char* procName) const {
+GrGLFuncPtr EGLGLTestContext::onPlatformGetProcAddress(const char* procName) const {
     return eglGetProcAddress(procName);
 }
 
@@ -293,18 +294,18 @@
     return false;
 }
 
-SkEGLFenceSync* SkEGLFenceSync::CreateIfSupported(EGLDisplay display) {
+EGLFenceSync* EGLFenceSync::CreateIfSupported(EGLDisplay display) {
     if (!display || !supports_egl_extension(display, "EGL_KHR_fence_sync")) {
         return nullptr;
     }
-    return new SkEGLFenceSync(display);
+    return new EGLFenceSync(display);
 }
 
-SkPlatformGpuFence SkEGLFenceSync::insertFence() const {
+SkPlatformGpuFence EGLFenceSync::insertFence() const {
     return eglCreateSyncKHR(fDisplay, EGL_SYNC_FENCE_KHR, nullptr);
 }
 
-bool SkEGLFenceSync::waitFence(SkPlatformGpuFence platformFence, bool flush) const {
+bool EGLFenceSync::waitFence(SkPlatformGpuFence platformFence, bool flush) const {
     EGLSyncKHR eglsync = static_cast<EGLSyncKHR>(platformFence);
     return EGL_CONDITION_SATISFIED_KHR ==
             eglClientWaitSyncKHR(fDisplay,
@@ -313,7 +314,7 @@
                                  EGL_FOREVER_KHR);
 }
 
-void SkEGLFenceSync::deleteFence(SkPlatformGpuFence platformFence) const {
+void EGLFenceSync::deleteFence(SkPlatformGpuFence platformFence) const {
     EGLSyncKHR eglsync = static_cast<EGLSyncKHR>(platformFence);
     eglDestroySyncKHR(fDisplay, eglsync);
 }
@@ -321,12 +322,13 @@
 }  // anonymous namespace
 
 namespace sk_gpu_test {
-GLContext *CreatePlatformGLContext(GrGLStandard forcedGpuAPI, GLContext *shareContext) {
+GLTestContext *CreatePlatformGLTestContext(GrGLStandard forcedGpuAPI,
+                                           GLTestContext *shareContext) {
     SkASSERT(!shareContext);
     if (shareContext) {
         return nullptr;
     }
-    EGLGLContext *ctx = new EGLGLContext(forcedGpuAPI);
+    EGLGLTestContext *ctx = new EGLGLTestContext(forcedGpuAPI);
     if (!ctx->isValid()) {
         delete ctx;
         return nullptr;
diff --git a/tools/gpu/gl/glx/CreatePlatformGLContext_glx.cpp b/tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp
similarity index 91%
rename from tools/gpu/gl/glx/CreatePlatformGLContext_glx.cpp
rename to tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp
index b2168e3..7429bed 100644
--- a/tools/gpu/gl/glx/CreatePlatformGLContext_glx.cpp
+++ b/tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp
@@ -5,7 +5,7 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
-#include "gl/GLContext.h"
+#include "gl/GLTestContext.h"
 
 #include <X11/Xlib.h>
 #include <GL/glx.h>
@@ -44,10 +44,10 @@
     return 0;
 }
 
-class GLXGLContext : public sk_gpu_test::GLContext {
+class GLXGLTestContext : public sk_gpu_test::GLTestContext {
 public:
-    GLXGLContext(GrGLStandard forcedGpuAPI, GLXGLContext* shareList);
-    ~GLXGLContext() override;
+    GLXGLTestContext(GrGLStandard forcedGpuAPI, GLXGLTestContext* shareList);
+    ~GLXGLTestContext() override;
 
 private:
     void destroyGLContext();
@@ -62,7 +62,7 @@
     GLXPixmap fGlxPixmap;
 };
 
-GLXGLContext::GLXGLContext(GrGLStandard forcedGpuAPI, GLXGLContext* shareContext)
+GLXGLTestContext::GLXGLTestContext(GrGLStandard forcedGpuAPI, GLXGLTestContext* shareContext)
     : fContext(nullptr)
     , fDisplay(nullptr)
     , fPixmap(0)
@@ -288,12 +288,12 @@
 }
 
 
-GLXGLContext::~GLXGLContext() {
+GLXGLTestContext::~GLXGLTestContext() {
     this->teardown();
     this->destroyGLContext();
 }
 
-void GLXGLContext::destroyGLContext() {
+void GLXGLTestContext::destroyGLContext() {
     if (fDisplay) {
         glXMakeCurrent(fDisplay, 0, 0);
 
@@ -317,26 +317,27 @@
     }
 }
 
-void GLXGLContext::onPlatformMakeCurrent() const {
+void GLXGLTestContext::onPlatformMakeCurrent() const {
     if (!glXMakeCurrent(fDisplay, fGlxPixmap, fContext)) {
         SkDebugf("Could not set the context.\n");
     }
 }
 
-void GLXGLContext::onPlatformSwapBuffers() const {
+void GLXGLTestContext::onPlatformSwapBuffers() const {
     glXSwapBuffers(fDisplay, fGlxPixmap);
 }
 
-GrGLFuncPtr GLXGLContext::onPlatformGetProcAddress(const char* procName) const {
+GrGLFuncPtr GLXGLTestContext::onPlatformGetProcAddress(const char* procName) const {
     return glXGetProcAddress(reinterpret_cast<const GLubyte*>(procName));
 }
 
 }  // anonymous namespace
 
 namespace sk_gpu_test {
-GLContext *CreatePlatformGLContext(GrGLStandard forcedGpuAPI, GLContext *shareContext) {
-    GLXGLContext *glxShareContext = reinterpret_cast<GLXGLContext *>(shareContext);
-    GLXGLContext *ctx = new GLXGLContext(forcedGpuAPI, glxShareContext);
+GLTestContext *CreatePlatformGLTestContext(GrGLStandard forcedGpuAPI,
+                                           GLTestContext *shareContext) {
+    GLXGLTestContext *glxShareContext = reinterpret_cast<GLXGLTestContext *>(shareContext);
+    GLXGLTestContext *ctx = new GLXGLTestContext(forcedGpuAPI, glxShareContext);
     if (!ctx->isValid()) {
         delete ctx;
         return nullptr;
diff --git a/tools/gpu/gl/iOS/CreatePlatformGLContext_iOS.mm b/tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm
similarity index 75%
rename from tools/gpu/gl/iOS/CreatePlatformGLContext_iOS.mm
rename to tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm
index d6507f2..d31cb86 100644
--- a/tools/gpu/gl/iOS/CreatePlatformGLContext_iOS.mm
+++ b/tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm
@@ -6,7 +6,7 @@
  * found in the LICENSE file.
  */
 
-#include "GLContext.h"
+#include "GLTestContext.h"
 #import <OpenGLES/EAGL.h>
 #include <dlfcn.h>
 
@@ -14,10 +14,10 @@
 
 namespace {
 
-class IOSGLContext : public sk_gpu_test::GLContext {
+class IOSGLTestContext : public sk_gpu_test::GLTestContext {
 public:
-    IOSGLContext();
-    ~IOSGLContext() override;
+    IOSGLTestContext();
+    ~IOSGLTestContext() override;
 
 private:
     void destroyGLContext();
@@ -30,7 +30,7 @@
     void* fGLLibrary;
 };
 
-IOSGLContext::IOSGLContext()
+IOSGLTestContext::IOSGLTestContext()
     : fEAGLContext(NULL)
     , fGLLibrary(RTLD_DEFAULT) {
 
@@ -56,12 +56,12 @@
     this->init(gl.release());
 }
 
-IOSGLContext::~IOSGLContext() {
+IOSGLTestContext::~IOSGLTestContext() {
     this->teardown();
     this->destroyGLContext();
 }
 
-void IOSGLContext::destroyGLContext() {
+void IOSGLTestContext::destroyGLContext() {
     if (fEAGLContext) {
         if ([EAGLContext currentContext] == EAGLCTX) {
             [EAGLContext setCurrentContext:nil];
@@ -75,22 +75,23 @@
 }
 
 
-void IOSGLContext::onPlatformMakeCurrent() const {
+void IOSGLTestContext::onPlatformMakeCurrent() const {
     if (![EAGLContext setCurrentContext:EAGLCTX]) {
         SkDebugf("Could not set the context.\n");
     }
 }
 
-void IOSGLContext::onPlatformSwapBuffers() const { }
+void IOSGLTestContext::onPlatformSwapBuffers() const { }
 
-GrGLFuncPtr IOSGLContext::onPlatformGetProcAddress(const char* procName) const {
+GrGLFuncPtr IOSGLTestContext::onPlatformGetProcAddress(const char* procName) const {
     return reinterpret_cast<GrGLFuncPtr>(dlsym(fGLLibrary, procName));
 }
 
 }  // anonymous namespace
 
 namespace sk_gpu_test {
-GLContext *CreatePlatformGLContext(GrGLStandard forcedGpuAPI, GLContext *shareContext) {
+GLTestContext *CreatePlatformGLTestContext(GrGLStandard forcedGpuAPI,
+                                           GLTestContext *shareContext) {
     SkASSERT(!shareContext);
     if (shareContext) {
         return NULL;
@@ -98,7 +99,7 @@
     if (kGL_GrGLStandard == forcedGpuAPI) {
         return NULL;
     }
-    IOSGLContext *ctx = new IOSGLContext;
+    IOSGLTestContext *ctx = new IOSGLTestContext;
     if (!ctx->isValid()) {
         delete ctx;
         return NULL;
diff --git a/tools/gpu/gl/mac/CreatePlatformGLContext_mac.cpp b/tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp
similarity index 79%
rename from tools/gpu/gl/mac/CreatePlatformGLContext_mac.cpp
rename to tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp
index 7da99d7..b2cdaac 100644
--- a/tools/gpu/gl/mac/CreatePlatformGLContext_mac.cpp
+++ b/tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp
@@ -7,17 +7,17 @@
  */
 #include "SkTypes.h"
 
-#include "gl/GLContext.h"
+#include "gl/GLTestContext.h"
 #include "AvailabilityMacros.h"
 
 #include <OpenGL/OpenGL.h>
 #include <dlfcn.h>
 
 namespace {
-class MacGLContext : public sk_gpu_test::GLContext {
+class MacGLTestContext : public sk_gpu_test::GLTestContext {
 public:
-    MacGLContext();
-    ~MacGLContext() override;
+    MacGLTestContext();
+    ~MacGLTestContext() override;
 
 private:
     void destroyGLContext();
@@ -30,7 +30,7 @@
     void* fGLLibrary;
 };
 
-MacGLContext::MacGLContext()
+MacGLTestContext::MacGLTestContext()
     : fContext(nullptr)
     , fGLLibrary(RTLD_DEFAULT) {
     CGLPixelFormatAttribute attributes[] = {
@@ -79,12 +79,12 @@
     this->init(gl.release());
 }
 
-MacGLContext::~MacGLContext() {
+MacGLTestContext::~MacGLTestContext() {
     this->teardown();
     this->destroyGLContext();
 }
 
-void MacGLContext::destroyGLContext() {
+void MacGLTestContext::destroyGLContext() {
     if (fContext) {
         CGLReleaseContext(fContext);
         fContext = nullptr;
@@ -94,22 +94,23 @@
     }
 }
 
-void MacGLContext::onPlatformMakeCurrent() const {
+void MacGLTestContext::onPlatformMakeCurrent() const {
     CGLSetCurrentContext(fContext);
 }
 
-void MacGLContext::onPlatformSwapBuffers() const {
+void MacGLTestContext::onPlatformSwapBuffers() const {
     CGLFlushDrawable(fContext);
 }
 
-GrGLFuncPtr MacGLContext::onPlatformGetProcAddress(const char* procName) const {
+GrGLFuncPtr MacGLTestContext::onPlatformGetProcAddress(const char* procName) const {
     return reinterpret_cast<GrGLFuncPtr>(dlsym(fGLLibrary, procName));
 }
 
 }  // anonymous namespace
 
 namespace sk_gpu_test {
-GLContext* CreatePlatformGLContext(GrGLStandard forcedGpuAPI, GLContext* shareContext) {
+GLTestContext* CreatePlatformGLTestContext(GrGLStandard forcedGpuAPI,
+                                           GLTestContext* shareContext) {
     SkASSERT(!shareContext);
     if (shareContext) {
         return nullptr;
@@ -118,7 +119,7 @@
     if (kGLES_GrGLStandard == forcedGpuAPI) {
         return nullptr;
     }
-    MacGLContext* ctx = new MacGLContext;
+    MacGLTestContext* ctx = new MacGLTestContext;
     if (!ctx->isValid()) {
         delete ctx;
         return nullptr;
diff --git a/tools/gpu/gl/mesa/GLContext_mesa.h b/tools/gpu/gl/mesa/GLContext_mesa.h
deleted file mode 100644
index 0d6ee4d..0000000
--- a/tools/gpu/gl/mesa/GLContext_mesa.h
+++ /dev/null
@@ -1,17 +0,0 @@
-
-/*
- * Copyright 2011 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-#ifndef GLContext_mesa_DEFINED
-#define GLContext_mesa_DEFINED
-
-#include "gl/GLContext.h"
-
-namespace sk_gpu_test {
-GLContext* CreateMesaGLContext();
-}  // namespace sk_gpu_test
-
-#endif
diff --git a/tools/gpu/gl/mesa/GLContext_mesa.cpp b/tools/gpu/gl/mesa/GLTestContext_mesa.cpp
similarity index 96%
rename from tools/gpu/gl/mesa/GLContext_mesa.cpp
rename to tools/gpu/gl/mesa/GLTestContext_mesa.cpp
index e6cc7c7..e0cf9c1 100644
--- a/tools/gpu/gl/mesa/GLContext_mesa.cpp
+++ b/tools/gpu/gl/mesa/GLTestContext_mesa.cpp
@@ -8,7 +8,7 @@
 
 #include <GL/osmesa.h>
 
-#include "gl/mesa/GLContext_mesa.h"
+#include "gl/mesa/GLTestContext_mesa.h"
 #include "gl/GrGLDefines.h"
 
 #include "gl/GrGLAssembleInterface.h"
@@ -32,7 +32,7 @@
 
 static const GrGLint gBOGUS_SIZE = 16;
 
-class MesaGLContext : public sk_gpu_test::GLContext {
+class MesaGLContext : public sk_gpu_test::GLTestContext {
 private:
     typedef intptr_t Context;
 
@@ -140,7 +140,7 @@
 
 
 namespace sk_gpu_test {
-GLContext *CreateMesaGLContext() {
+GLTestContext *CreateMesaGLTestContext() {
     MesaGLContext *ctx = new MesaGLContext;
     if (!ctx->isValid()) {
         delete ctx;
diff --git a/tools/gpu/gl/mesa/GLTestContext_mesa.h b/tools/gpu/gl/mesa/GLTestContext_mesa.h
new file mode 100644
index 0000000..17c072e
--- /dev/null
+++ b/tools/gpu/gl/mesa/GLTestContext_mesa.h
@@ -0,0 +1,17 @@
+
+/*
+ * Copyright 2011 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+#ifndef GLTestContext_mesa_DEFINED
+#define GLTestContext_mesa_DEFINED
+
+#include "gl/GLTestContext.h"
+
+namespace sk_gpu_test {
+GLTestContext* CreateMesaGLTestContext();
+}  // namespace sk_gpu_test
+
+#endif
diff --git a/tools/gpu/gl/null/NullGLContext.cpp b/tools/gpu/gl/null/NullGLTestContext.cpp
similarity index 98%
rename from tools/gpu/gl/null/NullGLContext.cpp
rename to tools/gpu/gl/null/NullGLTestContext.cpp
index 4781c90..44abf59 100644
--- a/tools/gpu/gl/null/NullGLContext.cpp
+++ b/tools/gpu/gl/null/NullGLTestContext.cpp
@@ -6,7 +6,7 @@
  * found in the LICENSE file.
  */
 
-#include "NullGLContext.h"
+#include "NullGLTestContext.h"
 #include "gl/GrGLTestInterface.h"
 #include "gl/GrGLDefines.h"
 #include "gl/GrGLInterface.h"
@@ -605,7 +605,7 @@
     nullptr, // signifies the end of the array.
 };
 
-class NullGLContext : public sk_gpu_test::GLContext {
+class NullGLContext : public sk_gpu_test::GLTestContext {
 public:
     NullGLContext() { this->init(new NullInterface); }
    ~NullGLContext() override { this->teardown(); }
@@ -618,8 +618,8 @@
 }  // anonymous namespace
 
 namespace sk_gpu_test {
-GLContext* CreateNullGLContext() {
-    GLContext* ctx = new NullGLContext();
+GLTestContext* CreateNullGLTestContext() {
+    GLTestContext* ctx = new NullGLContext();
     if (ctx->isValid()) {
         return ctx;
     }
diff --git a/tools/gpu/gl/null/NullGLContext.h b/tools/gpu/gl/null/NullGLTestContext.h
similarity index 78%
rename from tools/gpu/gl/null/NullGLContext.h
rename to tools/gpu/gl/null/NullGLTestContext.h
index 16fb9fd..ebde61a 100644
--- a/tools/gpu/gl/null/NullGLContext.h
+++ b/tools/gpu/gl/null/NullGLTestContext.h
@@ -8,10 +8,10 @@
 #ifndef NullGLContext_DEFINED
 #define NullGLContext_DEFINED
 
-#include "gl/GLContext.h"
+#include "gl/GLTestContext.h"
 
 namespace sk_gpu_test {
-GLContext* CreateNullGLContext();
+GLTestContext* CreateNullGLTestContext();
 }  // namespace sk_gpu_test
 
 #endif
diff --git a/tools/gpu/gl/win/CreatePlatformGLContext_win.cpp b/tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp
similarity index 86%
rename from tools/gpu/gl/win/CreatePlatformGLContext_win.cpp
rename to tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp
index efee28b..3d70be8 100644
--- a/tools/gpu/gl/win/CreatePlatformGLContext_win.cpp
+++ b/tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp
@@ -6,7 +6,7 @@
  * found in the LICENSE file.
  */
 
-#include "gl/GLContext.h"
+#include "gl/GLTestContext.h"
 
 #include <windows.h>
 #include <GL/GL.h>
@@ -17,10 +17,10 @@
 
 namespace {
 
-class WinGLContext : public sk_gpu_test::GLContext {
+class WinGLTestContext : public sk_gpu_test::GLTestContext {
 public:
-    WinGLContext(GrGLStandard forcedGpuAPI);
-	~WinGLContext() override;
+    WinGLTestContext(GrGLStandard forcedGpuAPI);
+	~WinGLTestContext() override;
 
 private:
     void destroyGLContext();
@@ -36,9 +36,9 @@
     SkWGLPbufferContext* fPbufferContext;
 };
 
-ATOM WinGLContext::gWC = 0;
+ATOM WinGLTestContext::gWC = 0;
 
-WinGLContext::WinGLContext(GrGLStandard forcedGpuAPI)
+WinGLTestContext::WinGLTestContext(GrGLStandard forcedGpuAPI)
     : fWindow(nullptr)
     , fDeviceContext(nullptr)
     , fGlRenderContext(0)
@@ -130,12 +130,12 @@
     this->init(gl.release());
 }
 
-WinGLContext::~WinGLContext() {
+WinGLTestContext::~WinGLTestContext() {
     this->teardown();
     this->destroyGLContext();
 }
 
-void WinGLContext::destroyGLContext() {
+void WinGLTestContext::destroyGLContext() {
     SkSafeSetNull(fPbufferContext);
     if (fGlRenderContext) {
         wglDeleteContext(fGlRenderContext);
@@ -151,7 +151,7 @@
     }
 }
 
-void WinGLContext::onPlatformMakeCurrent() const {
+void WinGLTestContext::onPlatformMakeCurrent() const {
     HDC dc;
     HGLRC glrc;
 
@@ -168,7 +168,7 @@
     }
 }
 
-void WinGLContext::onPlatformSwapBuffers() const {
+void WinGLTestContext::onPlatformSwapBuffers() const {
     HDC dc;
 
     if (nullptr == fPbufferContext) {
@@ -181,19 +181,20 @@
     }
 }
 
-GrGLFuncPtr WinGLContext::onPlatformGetProcAddress(const char* name) const {
+GrGLFuncPtr WinGLTestContext::onPlatformGetProcAddress(const char* name) const {
     return reinterpret_cast<GrGLFuncPtr>(wglGetProcAddress(name));
 }
 
 } // anonymous namespace
 
 namespace sk_gpu_test {
-GLContext* CreatePlatformGLContext(GrGLStandard forcedGpuAPI, GLContext *shareContext) {
+GLTestContext* CreatePlatformGLTestContext(GrGLStandard forcedGpuAPI,
+                                           GLTestContext *shareContext) {
     SkASSERT(!shareContext);
     if (shareContext) {
         return nullptr;
     }
-    WinGLContext *ctx = new WinGLContext(forcedGpuAPI);
+    WinGLTestContext *ctx = new WinGLTestContext(forcedGpuAPI);
     if (!ctx->isValid()) {
         delete ctx;
         return nullptr;
diff --git a/tools/kilobench/kilobench.cpp b/tools/kilobench/kilobench.cpp
index 8123835..f4c2999 100644
--- a/tools/kilobench/kilobench.cpp
+++ b/tools/kilobench/kilobench.cpp
@@ -218,10 +218,10 @@
         return true;
     }
 
-    GLContext* gl() { return fGL; }
+    GLTestContext* gl() { return fGL; }
 
 private:
-    GLContext* fGL;
+    GLTestContext* fGL;
     SkAutoTDelete<SkSurface> fSurface;
 };
 
@@ -282,7 +282,7 @@
 static double now_ms() { return SkTime::GetNSecs() * 1e-6; }
 
 struct TimingThread {
-    TimingThread(GLContext* mainContext)
+    TimingThread(GLTestContext* mainContext)
         : fFenceSync(mainContext->fenceSync())
         ,  fMainContext(mainContext)
         ,  fDone(false) {}
@@ -308,8 +308,8 @@
 
     void timingLoop() {
         // Create a context which shares display lists with the main thread
-        SkAutoTDelete<GLContext> glContext(CreatePlatformGLContext(kNone_GrGLStandard,
-                                                                   fMainContext));
+        SkAutoTDelete<GLTestContext> glContext(CreatePlatformGLTestContext(kNone_GrGLStandard,
+                                                                           fMainContext));
         glContext->makeCurrent();
 
         // Basic timing methodology is:
@@ -405,7 +405,7 @@
     SyncQueue fFrameEndSyncs;
     SkTArray<double> fTimings;
     SkMutex fDoneMutex;
-    GLContext* fMainContext;
+    GLTestContext* fMainContext;
     bool fDone;
 };
 
diff --git a/tools/skiaserve/Request.cpp b/tools/skiaserve/Request.cpp
index d9e1bda..225ca39 100644
--- a/tools/skiaserve/Request.cpp
+++ b/tools/skiaserve/Request.cpp
@@ -65,7 +65,7 @@
 SkCanvas* Request::getCanvas() {
 #if SK_SUPPORT_GPU
     GrContextFactory* factory = fContextFactory;
-    GLContext* gl = factory->getContextInfo(GrContextFactory::kNative_GLContextType,
+    GLTestContext* gl = factory->getContextInfo(GrContextFactory::kNative_GLContextType,
                                             GrContextFactory::kNone_GLContextOptions).fGLContext;
     gl->makeCurrent();
 #endif