diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h')
-rw-r--r-- | Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h index 7c40566e9..316e5e9b5 100644 --- a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h +++ b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h @@ -24,11 +24,12 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef Extensions3DOpenGLES_h -#define Extensions3DOpenGLES_h +#pragma once #include "Extensions3DOpenGLCommon.h" +#if USE(OPENGL_ES_2) + #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> @@ -61,6 +62,8 @@ namespace WebCore { class Extensions3DOpenGLES : public Extensions3DOpenGLCommon { public: + // This class only needs to be instantiated by GraphicsContext3D implementations. + Extensions3DOpenGLES(GraphicsContext3D*, bool useIndexedGetString); virtual ~Extensions3DOpenGLES(); virtual void framebufferTexture2DMultisampleIMG(unsigned long target, unsigned long attachment, unsigned long textarget, unsigned int texture, int level, unsigned long samples); @@ -69,7 +72,6 @@ public: // Extension3D methods virtual void blitFramebuffer(long srcX0, long srcY0, long srcX1, long srcY1, long dstX0, long dstY0, long dstX1, long dstY1, unsigned long mask, unsigned long filter); virtual void renderbufferStorageMultisample(unsigned long target, unsigned long samples, unsigned long internalformat, unsigned long width, unsigned long height); - virtual void copyTextureCHROMIUM(GC3Denum, Platform3DObject, Platform3DObject, GC3Dint, GC3Denum); virtual void insertEventMarkerEXT(const String&); virtual void pushGroupMarkerEXT(const String&); virtual void popGroupMarkerEXT(void); @@ -80,9 +82,13 @@ public: virtual void bindVertexArrayOES(Platform3DObject); virtual void drawBuffersEXT(GC3Dsizei, const GC3Denum*); + virtual void drawArraysInstanced(GC3Denum mode, GC3Dint first, GC3Dsizei count, GC3Dsizei primcount); + virtual void drawElementsInstanced(GC3Denum mode, GC3Dsizei count, GC3Denum type, long long offset, GC3Dsizei primcount); + virtual void vertexAttribDivisor(GC3Duint index, GC3Duint divisor); + // EXT Robustness - reset virtual int getGraphicsResetStatusARB(); - void setEXTContextLostCallback(PassOwnPtr<GraphicsContext3D::ContextLostCallback>); + void setEXTContextLostCallback(std::unique_ptr<GraphicsContext3D::ContextLostCallback>); // EXT Robustness - etc virtual void readnPixelsEXT(int x, int y, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, GC3Dsizei bufSize, void *data); @@ -90,10 +96,6 @@ public: virtual void getnUniformivEXT(GC3Duint program, int location, GC3Dsizei bufSize, int *params); protected: - // This class only needs to be instantiated by GraphicsContext3D implementations. - friend class GraphicsContext3D; - Extensions3DOpenGLES(GraphicsContext3D*); - virtual bool supportsExtension(const String&); virtual String getExtensions(); @@ -101,9 +103,10 @@ protected: bool m_supportsOESvertexArrayObject; bool m_supportsIMGMultisampledRenderToTexture; + bool m_supportsANGLEinstancedArrays; - PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMG m_glFramebufferTexture2DMultisampleIMG; - PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG m_glRenderbufferStorageMultisampleIMG; + PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC m_glFramebufferTexture2DMultisampleIMG; + PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC m_glRenderbufferStorageMultisampleIMG; PFNGLBINDVERTEXARRAYOESPROC m_glBindVertexArrayOES; PFNGLDELETEVERTEXARRAYSOESPROC m_glDeleteVertexArraysOES; PFNGLGENVERTEXARRAYSOESPROC m_glGenVertexArraysOES; @@ -112,10 +115,13 @@ protected: PFNGLREADNPIXELSEXTPROC m_glReadnPixelsEXT; PFNGLGETNUNIFORMFVEXTPROC m_glGetnUniformfvEXT; PFNGLGETNUNIFORMIVEXTPROC m_glGetnUniformivEXT; + PFNGLVERTEXATTRIBDIVISORANGLEPROC m_glVertexAttribDivisorANGLE; + PFNGLDRAWARRAYSINSTANCEDANGLEPROC m_glDrawArraysInstancedANGLE; + PFNGLDRAWELEMENTSINSTANCEDANGLEPROC m_glDrawElementsInstancedANGLE; - OwnPtr<GraphicsContext3D::ContextLostCallback> m_contextLostCallback; + std::unique_ptr<GraphicsContext3D::ContextLostCallback> m_contextLostCallback; }; } // namespace WebCore -#endif // Extensions3DOpenGLES_h +#endif // USE(OPENGL_ES_2) |