Index: tools/gpu/gl/egl/CreatePlatformGLContext_egl.cpp |
diff --git a/src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp b/tools/gpu/gl/egl/CreatePlatformGLContext_egl.cpp |
similarity index 95% |
rename from src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp |
rename to tools/gpu/gl/egl/CreatePlatformGLContext_egl.cpp |
index 1644254c09800852c8b6e869debb501383d69c9a..ac2e7ca7cf63716efcee9fe1a9b090e98c7932bc 100644 |
--- a/src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp |
+++ b/tools/gpu/gl/egl/CreatePlatformGLContext_egl.cpp |
@@ -1,10 +1,11 @@ |
+ |
/* |
* Copyright 2011 Google Inc. |
* |
* Use of this source code is governed by a BSD-style license that can be |
* found in the LICENSE file. |
*/ |
-#include "gl/SkGLContext.h" |
+#include "gl/GLContext.h" |
#include <GLES2/gl2.h> |
@@ -34,7 +35,7 @@ private: |
typedef SkGpuFenceSync INHERITED; |
}; |
-class EGLGLContext : public SkGLContext { |
+class EGLGLContext : public sk_gpu_test::GLContext { |
public: |
EGLGLContext(GrGLStandard forcedGpuAPI); |
~EGLGLContext() override; |
@@ -42,7 +43,7 @@ public: |
GrEGLImage texture2DToEGLImage(GrGLuint texID) const override; |
void destroyEGLImage(GrEGLImage) const override; |
GrGLuint eglImageToExternalTexture(GrEGLImage) const override; |
- SkGLContext* createNew() const override; |
+ sk_gpu_test::GLContext* createNew() const override; |
private: |
void destroyGLContext(); |
@@ -253,8 +254,8 @@ GrGLuint EGLGLContext::eglImageToExternalTexture(GrEGLImage image) const { |
return texID; |
} |
-SkGLContext* EGLGLContext::createNew() const { |
- SkGLContext* ctx = SkCreatePlatformGLContext(this->gl()->fStandard); |
+sk_gpu_test::GLContext* EGLGLContext::createNew() const { |
+ sk_gpu_test::GLContext* ctx = new EGLGLContext(this->gl()->fStandard); |
if (ctx) { |
ctx->makeCurrent(); |
} |
@@ -317,17 +318,20 @@ void SkEGLFenceSync::deleteFence(SkPlatformGpuFence platformFence) const { |
eglDestroySyncKHR(fDisplay, eglsync); |
} |
-} // anonymous namespace |
+} // anonymous namespace |
-SkGLContext* SkCreatePlatformGLContext(GrGLStandard forcedGpuAPI, SkGLContext* shareContext) { |
+namespace sk_gpu_test { |
+GLContext *CreatePlatformGLContext(GrGLStandard forcedGpuAPI, GLContext *shareContext) { |
SkASSERT(!shareContext); |
if (shareContext) { |
return nullptr; |
} |
- EGLGLContext* ctx = new EGLGLContext(forcedGpuAPI); |
+ EGLGLContext *ctx = new EGLGLContext(forcedGpuAPI); |
if (!ctx->isValid()) { |
delete ctx; |
return nullptr; |
} |
return ctx; |
} |
+} // namespace sk_gpu_test |
+ |