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

Unified Diff: include/gpu/gl/SkGLContext.h

Issue 1451683002: Initial version of external_oes texture support and unit test (Closed) Base URL: https://skia.googlesource.com/skia.git@target
Patch Set: angle cleanup Created 5 years, 1 month 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
Index: include/gpu/gl/SkGLContext.h
diff --git a/include/gpu/gl/SkGLContext.h b/include/gpu/gl/SkGLContext.h
index 75cfcfee045896013f7c6dae3239ecc2e4f96683..905cb5e59ae9e0a3a8ef5fa2c7b538c029f99c30 100644
--- a/include/gpu/gl/SkGLContext.h
+++ b/include/gpu/gl/SkGLContext.h
@@ -36,6 +36,16 @@ public:
void makeCurrent() const;
+ /** Used for testing EGLImage integration. Take a GL_TEXTURE_2D and wraps it in an EGL Image */
+ virtual GrEGLImage texture2DToEGLImage(GrGLuint /*texID*/) const { return 0; }
+ virtual void destroyEGLImage(GrEGLImage) const {}
+
+ /**
+ * Used for testing EGLImage integration. Takes a EGLImage and wraps it in a
+ * GL_TEXTURE_EXTERNAL_OES.
+ */
+ virtual GrGLuint eglImageToExternalTexture(GrEGLImage) const { return 0; }
+
/**
* The only purpose of this function it to provide a means of scheduling
* work on the GPU (since all of the subclasses create primary buffers for
@@ -59,6 +69,12 @@ public:
*/
void testAbandon();
+ /**
+ * Creates a new GL context of the same type and makes the returned context current
+ * (if not null).
+ */
+ virtual SkGLContext* createNew() const { return nullptr; }
egdaniel 2015/11/20 21:57:42 is this for testing? if some add that to comment
bsalomon 2015/11/20 22:43:55 The whole class is for testing. Amended the commen
+
class GLFenceSync; // SkGpuFenceSync implementation that uses the OpenGL functionality.
protected:

Powered by Google App Engine
This is Rietveld 408576698