[WK2][EFL] Divide ENABLE(WEBGL) into ENABLE(WEBGL) and USE(3D_GRAPHICS) in CMakeLists.txt
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jul 2012 13:19:13 +0000 (13:19 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jul 2012 13:19:13 +0000 (13:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=91584

Patch by YoungTaeck Song <youngtaeck.song@samsung.com> on 2012-07-18
Reviewed by Noam Rosenthal.

This patch is a subset of Efl's UI_SIDE_COMPOSITING implementation.
Modified CMakeLists.txt so that the basic 3D-graphics sources can be compiled even when WebGL is disabled.

* CMakeLists.txt:
* PlatformEfl.cmake:
* platform/graphics/GraphicsContext3D.h:
(GraphicsContext3D):
* platform/graphics/efl/GraphicsContext3DEfl.cpp:
(WebCore::GraphicsContext3D::platformGraphicsContext3D):

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

Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/PlatformEfl.cmake
Source/WebCore/platform/graphics/GraphicsContext3D.h
Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp

index 9536766..72f7b2c 100644 (file)
@@ -2310,12 +2310,74 @@ IF (ENABLE_MHTML)
 ENDIF ()
 
 IF (ENABLE_WEBGL)
-    #ANGLE
+    SET(WTF_USE_3D_GRAPHICS 1)
+    ADD_DEFINITIONS(-DWTF_USE_3D_GRAPHICS=1)
+
+    LIST(APPEND WebCore_SOURCES
+        html/canvas/OESStandardDerivatives.cpp
+        html/canvas/OESTextureFloat.cpp
+        html/canvas/OESVertexArrayObject.cpp
+        html/canvas/WebGLBuffer.cpp
+        html/canvas/WebGLCompressedTextureS3TC.cpp
+        html/canvas/WebGLContextAttributes.cpp
+        html/canvas/WebGLContextEvent.cpp
+        html/canvas/WebGLContextGroup.cpp
+        html/canvas/WebGLContextObject.cpp
+        html/canvas/WebGLDebugRendererInfo.cpp
+        html/canvas/WebGLDebugShaders.cpp
+        html/canvas/WebGLDepthTexture.cpp
+        html/canvas/WebGLFramebuffer.cpp
+        html/canvas/WebGLGetInfo.cpp
+        html/canvas/WebGLLoseContext.cpp
+        html/canvas/WebGLObject.cpp
+        html/canvas/WebGLProgram.cpp
+        html/canvas/WebGLRenderbuffer.cpp
+        html/canvas/WebGLRenderingContext.cpp
+        html/canvas/WebGLShader.cpp
+        html/canvas/WebGLShaderPrecisionFormat.cpp
+        html/canvas/WebGLSharedObject.cpp
+        html/canvas/WebGLTexture.cpp
+        html/canvas/WebGLUniformLocation.cpp
+        html/canvas/WebGLVertexArrayObjectOES.cpp
+        html/canvas/WebGLExtension.cpp
+        html/canvas/EXTTextureFilterAnisotropic.cpp
+        html/canvas/OESStandardDerivatives.cpp
+        html/canvas/OESTextureFloat.cpp
+        html/canvas/OESVertexArrayObject.cpp
+    )
+    LIST(APPEND WebCore_IDL_FILES
+        html/canvas/EXTTextureFilterAnisotropic.idl
+        html/canvas/OESStandardDerivatives.idl
+        html/canvas/OESTextureFloat.idl
+        html/canvas/OESVertexArrayObject.idl
+        html/canvas/WebGLActiveInfo.idl
+        html/canvas/WebGLBuffer.idl
+        html/canvas/WebGLCompressedTextureS3TC.idl
+        html/canvas/WebGLContextAttributes.idl
+        html/canvas/WebGLContextEvent.idl
+        html/canvas/WebGLDebugRendererInfo.idl
+        html/canvas/WebGLDebugShaders.idl
+        html/canvas/WebGLDepthTexture.idl
+        html/canvas/WebGLFramebuffer.idl
+        html/canvas/WebGLLoseContext.idl
+        html/canvas/WebGLProgram.idl
+        html/canvas/WebGLRenderbuffer.idl
+        html/canvas/WebGLRenderingContext.idl
+        html/canvas/WebGLShader.idl
+        html/canvas/WebGLShaderPrecisionFormat.idl
+        html/canvas/WebGLTexture.idl
+        html/canvas/WebGLUniformLocation.idl
+        html/canvas/WebGLVertexArrayObjectOES.idl
+    )
+ENDIF ()
+
+IF (WTF_USE_3D_GRAPHICS)
     LIST(APPEND WebCore_INCLUDE_DIRECTORIES
         ${OPENGL_INCLUDE_DIR}
-        ${THIRDPARTY_DIR}/ANGLE/src
-       #${THIRDPARTY_DIR}/ANGLE/include #Defined as SYSTEM include in order to have less priority than actual system headers
-        ${THIRDPARTY_DIR}/ANGLE/include/GLSLANG
+        "${THIRDPARTY_DIR}/ANGLE/src"
+        "${THIRDPARTY_DIR}/ANGLE/include"
+        "${THIRDPARTY_DIR}/ANGLE/include/GLSLANG"
+        "${WEBCORE_DIR}/platform/graphics/gpu"
     )
     LIST(APPEND WebCore_LIBRARIES
         ${OPENGL_gl_LIBRARY}
@@ -2413,64 +2475,10 @@ IF (ENABLE_WEBGL)
     )
 
     LIST(APPEND WebCore_SOURCES
-        html/canvas/OESStandardDerivatives.cpp
-        html/canvas/OESTextureFloat.cpp
-        html/canvas/OESVertexArrayObject.cpp
-        html/canvas/WebGLBuffer.cpp
-        html/canvas/WebGLCompressedTextureS3TC.cpp
-        html/canvas/WebGLContextAttributes.cpp
-        html/canvas/WebGLContextEvent.cpp
-        html/canvas/WebGLContextGroup.cpp
-        html/canvas/WebGLContextObject.cpp
-        html/canvas/WebGLDebugRendererInfo.cpp
-        html/canvas/WebGLDebugShaders.cpp
-        html/canvas/WebGLDepthTexture.cpp
-        html/canvas/WebGLFramebuffer.cpp
-        html/canvas/WebGLGetInfo.cpp
-        html/canvas/WebGLLoseContext.cpp
-        html/canvas/WebGLObject.cpp
-        html/canvas/WebGLProgram.cpp
-        html/canvas/WebGLRenderbuffer.cpp
-        html/canvas/WebGLRenderingContext.cpp
-        html/canvas/WebGLShader.cpp
-        html/canvas/WebGLShaderPrecisionFormat.cpp
-        html/canvas/WebGLSharedObject.cpp
-        html/canvas/WebGLTexture.cpp
-        html/canvas/WebGLUniformLocation.cpp
-        html/canvas/WebGLVertexArrayObjectOES.cpp
-        html/canvas/WebGLExtension.cpp
-        html/canvas/EXTTextureFilterAnisotropic.cpp
-        html/canvas/OESStandardDerivatives.cpp
-        html/canvas/OESTextureFloat.cpp
-        html/canvas/OESVertexArrayObject.cpp
         platform/graphics/ANGLEWebKitBridge.cpp
         platform/graphics/GraphicsContext3D.cpp
         platform/graphics/gpu/DrawingBuffer.cpp
     )
-    LIST(APPEND WebCore_IDL_FILES
-        html/canvas/EXTTextureFilterAnisotropic.idl
-        html/canvas/OESStandardDerivatives.idl
-        html/canvas/OESTextureFloat.idl
-        html/canvas/OESVertexArrayObject.idl
-        html/canvas/WebGLActiveInfo.idl
-        html/canvas/WebGLBuffer.idl
-        html/canvas/WebGLCompressedTextureS3TC.idl
-        html/canvas/WebGLContextAttributes.idl
-        html/canvas/WebGLContextEvent.idl
-        html/canvas/WebGLDebugRendererInfo.idl
-        html/canvas/WebGLDebugShaders.idl
-        html/canvas/WebGLDepthTexture.idl
-        html/canvas/WebGLFramebuffer.idl
-        html/canvas/WebGLLoseContext.idl
-        html/canvas/WebGLProgram.idl
-        html/canvas/WebGLRenderbuffer.idl
-        html/canvas/WebGLRenderingContext.idl
-        html/canvas/WebGLShader.idl
-        html/canvas/WebGLShaderPrecisionFormat.idl
-        html/canvas/WebGLTexture.idl
-        html/canvas/WebGLUniformLocation.idl
-        html/canvas/WebGLVertexArrayObjectOES.idl
-    )
 ENDIF ()
 
 IF (ENABLE_REQUEST_ANIMATION_FRAME)
index 0a0f7b6..e78f24b 100644 (file)
@@ -1,3 +1,20 @@
+2012-07-18  YoungTaeck Song  <youngtaeck.song@samsung.com>
+
+        [WK2][EFL] Divide ENABLE(WEBGL) into ENABLE(WEBGL) and USE(3D_GRAPHICS) in CMakeLists.txt
+        https://bugs.webkit.org/show_bug.cgi?id=91584
+
+        Reviewed by Noam Rosenthal.
+
+        This patch is a subset of Efl's UI_SIDE_COMPOSITING implementation.
+        Modified CMakeLists.txt so that the basic 3D-graphics sources can be compiled even when WebGL is disabled.
+
+        * CMakeLists.txt:
+        * PlatformEfl.cmake:
+        * platform/graphics/GraphicsContext3D.h:
+        (GraphicsContext3D):
+        * platform/graphics/efl/GraphicsContext3DEfl.cpp:
+        (WebCore::GraphicsContext3D::platformGraphicsContext3D):
+
 2012-07-18  Zoltan Horvath  <zoltan@webkit.org>
 
         [Qt] Modify the using of the QImage::Format enum to the appropriate functions from NativeImageQt
index 32a31b6..f5f34e4 100644 (file)
@@ -263,24 +263,30 @@ IF (ENABLE_VIDEO)
   )
 ENDIF ()
 
-IF (ENABLE_WEBGL)
+IF (WTF_USE_3D_GRAPHICS)
+  SET(WTF_USE_OPENGL 1)
+  ADD_DEFINITIONS(-DWTF_USE_OPENGL=1)
+
   LIST(APPEND WebCore_INCLUDE_DIRECTORIES
-    ${OPENGL_INCLUDE_DIR}
     "${WEBCORE_DIR}/platform/graphics/cairo"
-    "${WEBCORE_DIR}/platform/graphics/glx"
     "${WEBCORE_DIR}/platform/graphics/opengl"
+    "${WEBCORE_DIR}/platform/graphics/texmap"
   )
   LIST(APPEND WebCore_LIBRARIES
     ${OPENGL_gl_LIBRARY}
   )
   LIST(APPEND WebCore_SOURCES
+    platform/graphics/OpenGLShims.cpp
     platform/graphics/cairo/DrawingBufferCairo.cpp
+    platform/graphics/cairo/GLContext.cpp
     platform/graphics/cairo/GraphicsContext3DCairo.cpp
-    platform/graphics/glx/GraphicsContext3DPrivate.cpp
-    platform/graphics/OpenGLShims.cpp
+    platform/graphics/cairo/GraphicsContext3DPrivate.cpp
     platform/graphics/opengl/Extensions3DOpenGL.cpp
+    platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
     platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
     platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
+    platform/graphics/texmap/TextureMapperGL.cpp
+    platform/graphics/texmap/TextureMapperShaderManager.cpp
   )
 ENDIF ()
 
index c2feec2..7433df6 100644 (file)
@@ -510,7 +510,7 @@ public:
     PlatformLayer* platformLayer() const;
 #endif
 #elif PLATFORM(EFL)
-    PlatformGraphicsContext3D platformGraphicsContext3D() const;
+    PlatformGraphicsContext3D platformGraphicsContext3D();
     Platform3DObject platformTexture() const { return m_texture; }
 #if USE(ACCELERATED_COMPOSITING)
     PlatformLayer* platformLayer() const;
index 2f5c96a..efe1a12 100644 (file)
@@ -51,7 +51,7 @@ GraphicsContext3D::~GraphicsContext3D()
 {
 }
 
-PlatformGraphicsContext3D GraphicsContext3D::platformGraphicsContext3D() const
+PlatformGraphicsContext3D GraphicsContext3D::platformGraphicsContext3D()
 {
     return m_private->platformGraphicsContext3D();
 }