- Revision
- 164524
- Author
- changseok...@collabora.com
- Date
- 2014-02-21 19:53:53 -0800 (Fri, 21 Feb 2014)
Log Message
Mac port uses ANGLE_instanced_arrays related apis through those in GraphicsContext3DCommon.cpp
https://bugs.webkit.org/show_bug.cgi?id=128803
Reviewed by Dean Jackson.
Merge mac port implementation of ANGLE_instanced_arrays into common code.
No new tests, no functionality changed.
* platform/graphics/mac/GraphicsContext3DMac.mm:
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
(WebCore::Extensions3DOpenGL::drawArraysInstanced):
(WebCore::Extensions3DOpenGL::drawElementsInstanced):
(WebCore::Extensions3DOpenGL::vertexAttribDivisor):
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::vertexAttribDivisor):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (164523 => 164524)
--- trunk/Source/WebCore/ChangeLog 2014-02-22 03:39:46 UTC (rev 164523)
+++ trunk/Source/WebCore/ChangeLog 2014-02-22 03:53:53 UTC (rev 164524)
@@ -1,3 +1,22 @@
+2014-02-21 ChangSeok Oh <changseok...@collabora.com>
+
+ Mac port uses ANGLE_instanced_arrays related apis through those in GraphicsContext3DCommon.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=128803
+
+ Reviewed by Dean Jackson.
+
+ Merge mac port implementation of ANGLE_instanced_arrays into common code.
+
+ No new tests, no functionality changed.
+
+ * platform/graphics/mac/GraphicsContext3DMac.mm:
+ * platform/graphics/opengl/Extensions3DOpenGL.cpp:
+ (WebCore::Extensions3DOpenGL::drawArraysInstanced):
+ (WebCore::Extensions3DOpenGL::drawElementsInstanced):
+ (WebCore::Extensions3DOpenGL::vertexAttribDivisor):
+ * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
+ (WebCore::GraphicsContext3D::vertexAttribDivisor):
+
2014-02-21 Myles C. Maxfield <mmaxfi...@apple.com>
After copy and paste, cursor may appear to be above the bottom of content
Modified: trunk/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm (164523 => 164524)
--- trunk/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm 2014-02-22 03:39:46 UTC (rev 164523)
+++ trunk/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm 2014-02-22 03:53:53 UTC (rev 164524)
@@ -370,44 +370,6 @@
{
}
-void GraphicsContext3D::drawArraysInstanced(GC3Denum mode, GC3Dint first, GC3Dsizei count, GC3Dsizei primcount)
-{
-#if PLATFORM(IOS) || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
- makeContextCurrent();
- ::glDrawArraysInstancedARB(mode, first, count, primcount);
-#else
- UNUSED_PARAM(mode);
- UNUSED_PARAM(first);
- UNUSED_PARAM(count);
- UNUSED_PARAM(primcount);
-#endif
}
-void GraphicsContext3D::drawElementsInstanced(GC3Denum mode, GC3Dsizei count, GC3Denum type, GC3Dintptr offset, GC3Dsizei primcount)
-{
-#if PLATFORM(IOS) || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
- makeContextCurrent();
- ::glDrawElementsInstancedARB(mode, count, type, reinterpret_cast<GLvoid*>(static_cast<intptr_t>(offset)), primcount);
-#else
- UNUSED_PARAM(mode);
- UNUSED_PARAM(count);
- UNUSED_PARAM(type);
- UNUSED_PARAM(offset);
- UNUSED_PARAM(primcount);
-#endif
-}
-
-void GraphicsContext3D::vertexAttribDivisor(GC3Duint index, GC3Duint divisor)
-{
-#if PLATFORM(IOS) || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
- makeContextCurrent();
- ::glVertexAttribDivisorARB(index, divisor);
-#else
- UNUSED_PARAM(index);
- UNUSED_PARAM(divisor);
-#endif
-}
-
-}
-
#endif // USE(3D_GRAPHICS)
Modified: trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp (164523 => 164524)
--- trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp 2014-02-22 03:39:46 UTC (rev 164523)
+++ trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp 2014-02-22 03:53:53 UTC (rev 164524)
@@ -232,9 +232,11 @@
void Extensions3DOpenGL::drawArraysInstanced(GC3Denum mode, GC3Dint first, GC3Dsizei count, GC3Dsizei primcount)
{
+ m_context->makeContextCurrent();
#if PLATFORM(GTK)
- m_context->makeContextCurrent();
::glDrawArraysInstanced(mode, first, count, primcount);
+#elif PLATFORM(IOS) || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+ ::glDrawArraysInstancedARB(mode, first, count, primcount);
#else
UNUSED_PARAM(mode);
UNUSED_PARAM(first);
@@ -245,9 +247,11 @@
void Extensions3DOpenGL::drawElementsInstanced(GC3Denum mode, GC3Dsizei count, GC3Denum type, long long offset, GC3Dsizei primcount)
{
+ m_context->makeContextCurrent();
#if PLATFORM(GTK)
- m_context->makeContextCurrent();
::glDrawElementsInstanced(mode, count, type, reinterpret_cast<GLvoid*>(static_cast<intptr_t>(offset)), primcount);
+#elif PLATFORM(IOS) || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+ ::glDrawElementsInstancedARB(mode, count, type, reinterpret_cast<GLvoid*>(static_cast<intptr_t>(offset)), primcount);
#else
UNUSED_PARAM(mode);
UNUSED_PARAM(count);
@@ -259,9 +263,11 @@
void Extensions3DOpenGL::vertexAttribDivisor(GC3Duint index, GC3Duint divisor)
{
+ m_context->makeContextCurrent();
#if PLATFORM(GTK)
- m_context->makeContextCurrent();
::glVertexAttribDivisor(index, divisor);
+#elif PLATFORM(IOS) || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+ ::glVertexAttribDivisorARB(index, divisor);
#else
UNUSED_PARAM(index);
UNUSED_PARAM(divisor);
Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp (164523 => 164524)
--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp 2014-02-22 03:39:46 UTC (rev 164523)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp 2014-02-22 03:53:53 UTC (rev 164524)
@@ -1630,7 +1630,6 @@
::glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
}
-#if !PLATFORM(COCOA)
void GraphicsContext3D::drawArraysInstanced(GC3Denum mode, GC3Dint first, GC3Dsizei count, GC3Dsizei primcount)
{
getExtensions()->drawArraysInstanced(mode, first, count, primcount);
@@ -1645,7 +1644,6 @@
{
getExtensions()->vertexAttribDivisor(index, divisor);
}
-#endif
}