| 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 86e2ebc4cde4f0c9d37e006a2fff87d8fa25a32b..ac2e7ca7cf63716efcee9fe1a9b090e98c7932bc 100644
|
| --- a/src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp
|
| +++ b/tools/gpu/gl/egl/CreatePlatformGLContext_egl.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/SkGLContext.h"
|
| +#include "gl/GLContext.h"
|
|
|
| #include <GLES2/gl2.h>
|
|
|
| @@ -35,7 +35,7 @@ private:
|
| typedef SkGpuFenceSync INHERITED;
|
| };
|
|
|
| -class EGLGLContext : public SkGLContext {
|
| +class EGLGLContext : public sk_gpu_test::GLContext {
|
| public:
|
| EGLGLContext(GrGLStandard forcedGpuAPI);
|
| ~EGLGLContext() override;
|
| @@ -43,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();
|
| @@ -254,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();
|
| }
|
| @@ -318,18 +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
|
|
|
|
|