diff options
author | 2015-11-20 20:24:31 -0800 | |
---|---|---|
committer | 2015-11-20 20:24:31 -0800 | |
commit | 0315dbcb554fe7f5fa80a81079fd8d2e61fc20e1 (patch) | |
tree | e8aca2e2b4437baf79c8a85ddc9bc2ce659ac734 /include/gpu/gl | |
parent | 27a048700778d4cebfc23301d1780649791b0e03 (diff) |
Revert of Initial version of external_oes texture support and unit test (patchset #14 id:260001 of https://codereview.chromium.org/1451683002/ )
Reason for revert:
Error wrapping external texture in GrTexture on some devices.
Original issue's description:
> Initial version of external_oes texture support and unit test
>
> Committed: https://skia.googlesource.com/skia/+/27a048700778d4cebfc23301d1780649791b0e03
TBR=joshualitt@google.com,egdaniel@google.com,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1459323004
Diffstat (limited to 'include/gpu/gl')
-rw-r--r-- | include/gpu/gl/GrGLFunctions.h | 5 | ||||
-rw-r--r-- | include/gpu/gl/GrGLInterface.h | 4 | ||||
-rw-r--r-- | include/gpu/gl/GrGLTypes.h | 4 | ||||
-rw-r--r-- | include/gpu/gl/SkGLContext.h | 19 | ||||
-rw-r--r-- | include/gpu/gl/angle/SkANGLEGLContext.h | 5 |
5 files changed, 7 insertions, 30 deletions
diff --git a/include/gpu/gl/GrGLFunctions.h b/include/gpu/gl/GrGLFunctions.h index 1086186df8..a8a721e7e6 100644 --- a/include/gpu/gl/GrGLFunctions.h +++ b/include/gpu/gl/GrGLFunctions.h @@ -69,7 +69,6 @@ typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLDrawArraysProc)(GrGLenum mode, GrGLin typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLDrawBufferProc)(GrGLenum mode); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLDrawBuffersProc)(GrGLsizei n, const GrGLenum* bufs); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLDrawElementsProc)(GrGLenum mode, GrGLsizei count, GrGLenum type, const GrGLvoid* indices); -typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLEGLImageTargetTexture2DProc)(GrGLenum target, GrGLeglImage image); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLEnableProc)(GrGLenum cap); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLEnableVertexAttribArrayProc)(GrGLuint index); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLEndQueryProc)(GrGLenum target); @@ -353,8 +352,8 @@ typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLObjectLabelProc)(GrGLenum identifier, /** EGL functions */ typedef const char* (GR_GL_FUNCTION_TYPE* GrEGLQueryStringProc)(GrEGLDisplay dpy, GrEGLint name); typedef GrEGLDisplay (GR_GL_FUNCTION_TYPE* GrEGLGetCurrentDisplayProc)(); -typedef GrEGLImage (GR_GL_FUNCTION_TYPE* GrEGLCreateImageProc)(GrEGLDisplay dpy, GrEGLContext ctx, GrEGLenum target, GrEGLClientBuffer buffer, const GrEGLint *attrib_list); -typedef GrEGLBoolean (GR_GL_FUNCTION_TYPE* GrEGLDestroyImageProc)(GrEGLDisplay dpy, GrEGLImage image); +typedef GrEGLImageKHR (GR_GL_FUNCTION_TYPE* GrEGLCreateImageProc)(GrEGLDisplay dpy, GrEGLContext ctx, GrEGLenum target, GrEGLClientBuffer buffer, const GrEGLint *attrib_list); +typedef GrEGLBoolean (GR_GL_FUNCTION_TYPE* GrEGLDestroyImageProc)(GrEGLDisplay dpy, GrEGLImageKHR image); } // extern "C" #endif diff --git a/include/gpu/gl/GrGLInterface.h b/include/gpu/gl/GrGLInterface.h index 31429a8ebc..ec27ace81f 100644 --- a/include/gpu/gl/GrGLInterface.h +++ b/include/gpu/gl/GrGLInterface.h @@ -498,8 +498,8 @@ public: GLPtr<GrGLObjectLabelProc> fObjectLabel; /* EGL functions */ - GLPtr<GrEGLCreateImageProc> fEGLCreateImage; - GLPtr<GrEGLDestroyImageProc> fEGLDestroyImage; + GLPtr<GrEGLCreateImageProc> fCreateImage; + GLPtr<GrEGLDestroyImageProc> fDestroyImage; } fFunctions; // Per-GL func callback diff --git a/include/gpu/gl/GrGLTypes.h b/include/gpu/gl/GrGLTypes.h index 248ce8886d..275eba556d 100644 --- a/include/gpu/gl/GrGLTypes.h +++ b/include/gpu/gl/GrGLTypes.h @@ -57,12 +57,12 @@ typedef signed long int GrGLsizeiptr; typedef signed long int GrGLintptr; typedef signed long int GrGLsizeiptr; #endif -typedef void* GrGLeglImage; + /** * EGL types. */ -typedef void* GrEGLImage; +typedef void* GrEGLImageKHR; typedef void* GrEGLDisplay; typedef void* GrEGLContext; typedef void* GrEGLClientBuffer; diff --git a/include/gpu/gl/SkGLContext.h b/include/gpu/gl/SkGLContext.h index 3420a47973..75cfcfee04 100644 --- a/include/gpu/gl/SkGLContext.h +++ b/include/gpu/gl/SkGLContext.h @@ -14,9 +14,8 @@ /** * Create an offscreen opengl context with an RGBA8 / 8bit stencil FBO. * Provides a GrGLInterface struct of function pointers for the context. - * This class is intended for Skia's testing needs and not for general - * use. */ + class SK_API SkGLContext : public SkRefCnt { public: ~SkGLContext() override; @@ -37,16 +36,6 @@ 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 @@ -70,12 +59,6 @@ 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; } - class GLFenceSync; // SkGpuFenceSync implementation that uses the OpenGL functionality. protected: diff --git a/include/gpu/gl/angle/SkANGLEGLContext.h b/include/gpu/gl/angle/SkANGLEGLContext.h index 7858fff964..8d5f83041a 100644 --- a/include/gpu/gl/angle/SkANGLEGLContext.h +++ b/include/gpu/gl/angle/SkANGLEGLContext.h @@ -27,10 +27,6 @@ public: } return ctx; } - GrEGLImage texture2DToEGLImage(GrGLuint texID) const override; - void destroyEGLImage(GrEGLImage) const override; - GrGLuint eglImageToExternalTexture(GrEGLImage) const override; - SkGLContext* createNew() const override; // The param is an EGLNativeDisplayType and the return is an EGLDispay. static void* GetD3DEGLDisplay(void* nativeDisplay, bool useGLBackend); @@ -46,7 +42,6 @@ private: void* fContext; void* fDisplay; void* fSurface; - bool fIsGLBackend; }; #endif |