Plumb through EXT_debug_marker entry points
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Aug 2012 17:51:48 +0000 (17:51 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Aug 2012 17:51:48 +0000 (17:51 +0000)
https://bugs.webkit.org/show_bug.cgi?id=93860

Patch by Gregg Tavares <gman@google.com> on 2012-08-14
Reviewed by Kenneth Russell.

Source/Platform:

insertEventMarkerEXT, pushGroupMarkerEXT, popGroupMarkerEXT are
all entry points exposed by the OpenGL ES EXT_debug_marker
extension.

* chromium/public/WebGraphicsContext3D.h:
(WebGraphicsContext3D):
(WebKit::WebGraphicsContext3D::insertEventMarkerEXT):
(WebKit::WebGraphicsContext3D::pushGroupMarkerEXT):
(WebKit::WebGraphicsContext3D::popGroupMarkerEXT):

Source/WebCore:

insertEventMarkerEXT, pushGroupMarkerEXT, popGroupMarkerEXT,
are all entry points exposed by the OpenGL ES
EXT_debug_marker extension

No new tests as no new functionality exposed to web.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore):
(WebCore::WebGLRenderingContext::create):
* platform/chromium/support/Extensions3DChromium.cpp:
(WebCore::Extensions3DChromium::insertEventMarkerEXT):
(WebCore):
(WebCore::Extensions3DChromium::pushGroupMarkerEXT):
(WebCore::Extensions3DChromium::popGroupMarkerEXT):
* platform/graphics/Extensions3D.h:
(Extensions3D):
* platform/graphics/chromium/Extensions3DChromium.h:
(Extensions3DChromium):
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
(WebCore::Extensions3DOpenGL::insertEventMarkerEXT):
(WebCore):
(WebCore::Extensions3DOpenGL::pushGroupMarkerEXT):
(WebCore::Extensions3DOpenGL::popGroupMarkerEXT):
* platform/graphics/opengl/Extensions3DOpenGL.h:
(Extensions3DOpenGL):
* platform/graphics/opengl/Extensions3DOpenGLES.cpp:
(WebCore::Extensions3DOpenGLES::insertEventMarkerEXT):
(WebCore):
(WebCore::Extensions3DOpenGLES::pushGroupMarkerEXT):
(WebCore::Extensions3DOpenGLES::popGroupMarkerEXT):
* platform/graphics/opengl/Extensions3DOpenGLES.h:
(Extensions3DOpenGLES):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@125580 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/Platform/ChangeLog
Source/Platform/chromium/public/WebGraphicsContext3D.h
Source/WebCore/ChangeLog
Source/WebCore/html/canvas/WebGLRenderingContext.cpp
Source/WebCore/platform/chromium/support/Extensions3DChromium.cpp
Source/WebCore/platform/graphics/Extensions3D.h
Source/WebCore/platform/graphics/chromium/Extensions3DChromium.h
Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp
Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h
Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp
Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h

index 3f97223..7ee676f 100644 (file)
@@ -1,3 +1,20 @@
+2012-08-14  Gregg Tavares  <gman@google.com>
+
+        Plumb through EXT_debug_marker entry points
+        https://bugs.webkit.org/show_bug.cgi?id=93860
+
+        Reviewed by Kenneth Russell.
+
+        insertEventMarkerEXT, pushGroupMarkerEXT, popGroupMarkerEXT are
+        all entry points exposed by the OpenGL ES EXT_debug_marker
+        extension.
+
+        * chromium/public/WebGraphicsContext3D.h:
+        (WebGraphicsContext3D):
+        (WebKit::WebGraphicsContext3D::insertEventMarkerEXT):
+        (WebKit::WebGraphicsContext3D::pushGroupMarkerEXT):
+        (WebKit::WebGraphicsContext3D::popGroupMarkerEXT):
+
 2012-08-13  James Robinson  <jamesr@chromium.org>
 
         [chromium] Make WebAnimation a pure virtual interface to hide implementation and avoid unresolved symbols
index c0f790b..312d4fa 100644 (file)
@@ -438,6 +438,11 @@ public:
     virtual void produceTextureCHROMIUM(WGC3Denum target, const WGC3Dbyte* mailbox) { }
     virtual void consumeTextureCHROMIUM(WGC3Denum target, const WGC3Dbyte* mailbox) { }
 
+    // GL_EXT_debug_marker
+    virtual void insertEventMarkerEXT(const WGC3Dchar* marker) { }
+    virtual void pushGroupMarkerEXT(const WGC3Dchar* marker) { }
+    virtual void popGroupMarkerEXT(void) { }
+
     GrGLInterface* createGrGLInterface();
 
 protected:
index 9521943..a9e47d9 100644 (file)
@@ -1,3 +1,43 @@
+2012-08-14  Gregg Tavares  <gman@google.com>
+
+        Plumb through EXT_debug_marker entry points
+        https://bugs.webkit.org/show_bug.cgi?id=93860
+
+        Reviewed by Kenneth Russell.
+
+        insertEventMarkerEXT, pushGroupMarkerEXT, popGroupMarkerEXT,
+        are all entry points exposed by the OpenGL ES
+        EXT_debug_marker extension
+
+        No new tests as no new functionality exposed to web.
+
+        * html/canvas/WebGLRenderingContext.cpp:
+        (WebCore):
+        (WebCore::WebGLRenderingContext::create):
+        * platform/chromium/support/Extensions3DChromium.cpp:
+        (WebCore::Extensions3DChromium::insertEventMarkerEXT):
+        (WebCore):
+        (WebCore::Extensions3DChromium::pushGroupMarkerEXT):
+        (WebCore::Extensions3DChromium::popGroupMarkerEXT):
+        * platform/graphics/Extensions3D.h:
+        (Extensions3D):
+        * platform/graphics/chromium/Extensions3DChromium.h:
+        (Extensions3DChromium):
+        * platform/graphics/opengl/Extensions3DOpenGL.cpp:
+        (WebCore::Extensions3DOpenGL::insertEventMarkerEXT):
+        (WebCore):
+        (WebCore::Extensions3DOpenGL::pushGroupMarkerEXT):
+        (WebCore::Extensions3DOpenGL::popGroupMarkerEXT):
+        * platform/graphics/opengl/Extensions3DOpenGL.h:
+        (Extensions3DOpenGL):
+        * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
+        (WebCore::Extensions3DOpenGLES::insertEventMarkerEXT):
+        (WebCore):
+        (WebCore::Extensions3DOpenGLES::pushGroupMarkerEXT):
+        (WebCore::Extensions3DOpenGLES::popGroupMarkerEXT):
+        * platform/graphics/opengl/Extensions3DOpenGLES.h:
+        (Extensions3DOpenGLES):
+
 2012-06-24  Robert Hogan  <robert@webkit.org>
 
         CSS 2.1 failure: Word-spacing affects each space and non-breaking space
index 1ee6215..f77a99a 100644 (file)
@@ -419,6 +419,10 @@ PassOwnPtr<WebGLRenderingContext> WebGLRenderingContext::create(HTMLCanvasElemen
         return nullptr;
     }
 
+    Extensions3D* extensions = context->getExtensions();
+    if (extensions->supports("GL_EXT_debug_marker"))
+        extensions->pushGroupMarkerEXT("WebGLRenderingContext");
+
     return adoptPtr(new WebGLRenderingContext(canvas, context, attributes));
 }
 
index bfc145d..9412274 100644 (file)
@@ -31,6 +31,7 @@
 #include "GraphicsContext3DPrivate.h"
 #include "NotImplemented.h"
 #include <public/WebGraphicsContext3D.h>
+#include <wtf/text/CString.h>
 
 namespace WebCore {
 
@@ -197,5 +198,19 @@ void Extensions3DChromium::getnUniformivEXT(GC3Duint program, int location, GC3D
     notImplemented();
 }
 
+void Extensions3DChromium::insertEventMarkerEXT(const String& marker)
+{
+    m_private->webContext()->insertEventMarkerEXT(marker.utf8().data());
+}
+
+void Extensions3DChromium::pushGroupMarkerEXT(const String& marker)
+{
+    m_private->webContext()->pushGroupMarkerEXT(marker.utf8().data());
+}
+
+void Extensions3DChromium::popGroupMarkerEXT(void)
+{
+    m_private->webContext()->popGroupMarkerEXT();
+}
 
 } // namespace WebCore
index 05f30fd..5f28afb 100644 (file)
@@ -66,6 +66,7 @@ public:
     //   GL_OES_compressed_ETC1_RGB8_texture
     //   GL_IMG_texture_compression_pvrtc
     //   EXT_texture_filter_anisotropic
+    //   GL_EXT_debug_marker
     //   GL_CHROMIUM_copy_texture
     //   GL_CHROMIUM_flipy
 
@@ -182,6 +183,11 @@ public:
     virtual void readnPixelsEXT(int x, int y, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, GC3Dsizei bufSize, void *data) = 0;
     virtual void getnUniformfvEXT(GC3Duint program, int location, GC3Dsizei bufSize, float *params) = 0;
     virtual void getnUniformivEXT(GC3Duint program, int location, GC3Dsizei bufSize, int *params) = 0;
+
+    // GL_EXT_debug_marker
+    virtual void insertEventMarkerEXT(const String&) = 0;
+    virtual void pushGroupMarkerEXT(const String&) = 0;
+    virtual void popGroupMarkerEXT(void) = 0;
 };
 
 } // namespace WebCore
index 2df3156..edd6c13 100644 (file)
@@ -49,6 +49,7 @@ public:
     //   GL_CHROMIUM_iosurface (Mac OS X specific)
     //   GL_CHROMIUM_command_buffer_query
     //   GL_ANGLE_texture_usage
+    //   GL_EXT_debug_marker
     //   GL_EXT_texture_storage
     //   GL_EXT_occlusion_query_boolean
 
@@ -131,6 +132,11 @@ public:
     virtual void getnUniformfvEXT(GC3Duint program, int location, GC3Dsizei bufSize, float *params);
     virtual void getnUniformivEXT(GC3Duint program, int location, GC3Dsizei bufSize, int *params);
 
+    // GL_EXT_debug_marker
+    virtual void insertEventMarkerEXT(const String&);
+    virtual void pushGroupMarkerEXT(const String&);
+    virtual void popGroupMarkerEXT(void);
+
 private:
     // Instances of this class are strictly owned by the GraphicsContext3D implementation and do not
     // need to be instantiated by any other code.
index 9319ff8..4252966 100644 (file)
@@ -114,6 +114,24 @@ void Extensions3DOpenGL::copyTextureCHROMIUM(GC3Denum, Platform3DObject, Platfor
     return;
 }
 
+void Extensions3DOpenGL::insertEventMarkerEXT(const String&)
+{
+    // FIXME: implement this function and add GL_EXT_debug_marker in supports().
+    return;
+}
+
+void Extensions3DOpenGL::pushGroupMarkerEXT(const String&)
+{
+    // FIXME: implement this function and add GL_EXT_debug_marker in supports().
+    return;
+}
+
+void Extensions3DOpenGL::popGroupMarkerEXT(void)
+{
+    // FIXME: implement this function and add GL_EXT_debug_marker in supports().
+    return;
+}
+
 bool Extensions3DOpenGL::supportsExtension(const String& name)
 {
     // GL_ANGLE_framebuffer_blit and GL_ANGLE_framebuffer_multisample are "fake". They are implemented using other
index 786303c..36a44b4 100644 (file)
@@ -47,6 +47,9 @@ public:
     virtual GC3Dboolean isVertexArrayOES(Platform3DObject);
     virtual void bindVertexArrayOES(Platform3DObject);
     virtual void copyTextureCHROMIUM(GC3Denum, Platform3DObject, Platform3DObject, GC3Dint, GC3Denum);
+    virtual void insertEventMarkerEXT(const String&);
+    virtual void pushGroupMarkerEXT(const String&);
+    virtual void popGroupMarkerEXT(void);
 
 protected:
     // This class only needs to be instantiated by GraphicsContext3D implementations.
index 4ade7e5..9d619b6 100644 (file)
@@ -95,6 +95,21 @@ void Extensions3DOpenGLES::copyTextureCHROMIUM(GC3Denum, Platform3DObject, Platf
     notImplemented();
 }
 
+void Extensions3DOpenGLES::insertEventMarkerEXT(const String&)
+{
+    notImplemented();
+}
+
+void Extensions3DOpenGLES::pushGroupMarkerEXT(const String&)
+{
+    notImplemented();
+}
+
+void Extensions3DOpenGLES::popGroupMarkerEXT(void)
+{
+    notImplemented();
+}
+
 Platform3DObject Extensions3DOpenGLES::createVertexArrayOES()
 {
     m_context->makeContextCurrent();
index 1885880..6aa3274 100644 (file)
@@ -76,6 +76,9 @@ public:
     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);
 
     virtual Platform3DObject createVertexArrayOES();
     virtual void deleteVertexArrayOES(Platform3DObject);