Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Unified Diff: tools/gpu/gl/egl/CreatePlatformGLContext_egl.cpp

Issue 1815823002: Move SkGLContext and some GrGLInterface implementations to skgputest module (Closed) Base URL: https://chromium.googlesource.com/skia.git@debugobject
Patch Set: fix windows and android? Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gpu/gl/debug/GrVertexArrayObj.h ('k') | tools/gpu/gl/glx/CreatePlatformGLContext_glx.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
+
« no previous file with comments | « tools/gpu/gl/debug/GrVertexArrayObj.h ('k') | tools/gpu/gl/glx/CreatePlatformGLContext_glx.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698