[GTK] Add compilation options to enable/disable Accelerated Compositing and to choose...
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Dec 2011 09:16:58 +0000 (09:16 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Dec 2011 09:16:58 +0000 (09:16 +0000)
https://bugs.webkit.org/show_bug.cgi?id=73458

Patch by Nayan Kumar K <nayankk@motorola.com> on 2011-12-01
Reviewed by Martin Robinson.

.:

* GNUmakefile.am: Export new compilation macros.
* configure.ac: Provide option to choose accelerated compositing and texture mapper variations.

Source/WebCore:

No new tests added as this patch doesn't affect any functionality.

* GNUmakefile.am: Guard the include files.
* GNUmakefile.list.am: Guard the compilation of few files.
* platform/graphics/GraphicsLayer.h: Guard the typedef of GraphicsLayer.

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

ChangeLog
GNUmakefile.am
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.am
Source/WebCore/GNUmakefile.list.am
Source/WebCore/platform/graphics/GraphicsLayer.h
configure.ac

index 0e8f8d0..42fbe20 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2011-12-01  Nayan Kumar K  <nayankk@motorola.com>
+
+        [GTK] Add compilation options to enable/disable Accelerated Compositing and to choose texture mapper implementation.
+        https://bugs.webkit.org/show_bug.cgi?id=73458
+
+        Reviewed by Martin Robinson.
+
+        * GNUmakefile.am: Export new compilation macros.
+        * configure.ac: Provide option to choose accelerated compositing and texture mapper variations.
+
 2011-12-01  Patrick Gansterer  <paroga@webkit.org>
 
         [CMake] Make the feature defines for DOM names explicit
index cf2dd88..b8703f9 100644 (file)
@@ -170,6 +170,16 @@ global_cppflags += \
        -DWTF_USE_ACCELERATED_COMPOSITING=1
 endif
 
+if USE_TEXTURE_MAPPER_CAIRO
+global_cppflags += \
+       -DWTF_TEXTURE_MAPPER_CAIRO=1
+endif
+
+if USE_TEXTURE_MAPPER_GL
+global_cppflags += \
+       -DWTF_TEXTURE_MAPPER_OPENGL=1
+endif
+
 # ----
 # GTK+ 2.x/3.x support
 # ----
index 11d7054..89cdcb2 100644 (file)
@@ -1,3 +1,16 @@
+2011-12-01  Nayan Kumar K  <nayankk@motorola.com>
+
+        [GTK] Add compilation options to enable/disable Accelerated Compositing and to choose texture mapper implementation.
+        https://bugs.webkit.org/show_bug.cgi?id=73458
+
+        Reviewed by Martin Robinson.
+
+        No new tests added as this patch doesn't affect any functionality.
+
+        * GNUmakefile.am: Guard the include files.
+        * GNUmakefile.list.am: Guard the compilation of few files.
+        * platform/graphics/GraphicsLayer.h: Guard the typedef of GraphicsLayer.
+
 2011-12-01  Andrey Kosyakov  <caseq@chromium.org>
 
         Web Inspector: use object properties, not element attributes to pass preferred panel/line/request id in linkified anchors
index ab27a95..ad46891 100644 (file)
@@ -564,10 +564,16 @@ endif  # END ENABLE_3D_RENDERING
 # ---
 # Compile with accelerated compositing support
 # ---
-if USE_ACCELERATED_COMPOSITING
+
+if USE_TEXTURE_MAPPER_CAIRO
+webcore_cppflags += \
+       -I$(srcdir)/Source/WebCore/platform/graphics/texmap
+endif  # END USE_TEXTURE_MAPPER_CAIRO
+
+if USE_TEXTURE_MAPPER_GL
 webcore_cppflags += \
        -I$(srcdir)/Source/WebCore/platform/graphics/texmap
-endif  # USE_ACCELERATED_COMPOSITING
+endif  # END USETEXTURE_MAPPER_GL
 
 # ---
 # MHTML support
index 595511f..9f1839e 100644 (file)
@@ -5076,7 +5076,9 @@ webcore_sources += \
        Source/WebCore/platform/graphics/texmap/TextureMapperNode.cpp \
        Source/WebCore/platform/graphics/texmap/TextureMapperNode.h \
        Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayer.h
+if USE_TEXTURE_MAPPER_CAIRO
 webcoregtk_sources += \
        Source/WebCore/platform/graphics/cairo/TextureMapperCairo.cpp \
        Source/WebCore/platform/graphics/cairo/TextureMapperCairo.h
+endif  # END USE_TEXTURE_MAPPER_CAIRO
 endif  # USE_ACCELERATED_COMPOSITING
index 967fd1b..f288ddc 100644 (file)
@@ -68,11 +68,18 @@ namespace WebCore {
 class LayerChromium;
 typedef LayerChromium PlatformLayer;
 }
-#elif PLATFORM(EFL) || PLATFORM(GTK)
+#elif PLATFORM(EFL)
 namespace WebCore {
 class TextureMapperPlatformLayer;
 typedef TextureMapperPlatformLayer PlatformLayer;
 };
+#elif PLATFORM(GTK)
+#if USE(TEXTURE_MAPPER_CAIRO) || USE(TEXTURE_MAPPER_GL)
+namespace WebCore {
+class TextureMapperPlatformLayer;
+typedef TextureMapperPlatformLayer PlatformLayer;
+};
+#endif
 #else
 typedef void* PlatformLayer;
 #endif
index 3941bfc..73a0001 100644 (file)
@@ -389,12 +389,12 @@ AC_MSG_RESULT([$enable_webgl])
 # check whether to enable accelerated compositing support
 AC_MSG_CHECKING([whether to enable accelerated compositing support])
 AC_ARG_WITH(accelerated_compositing,
-            AC_HELP_STRING([--with-accelerated-compositing],
+            AC_HELP_STRING([--with-accelerated-compositing=@<:@no/opengl/cairo@:>@],
                            [use accelerated compositing (experimental) [default=no]]),
             [], [with_accelerated_compositing="no"])
 AC_MSG_RESULT([$with_accelerated_compositing])
 
-if test "$enable_webgl" = "yes" || test "with_accelerated_compositing" = "yes"; then
+if test "$enable_webgl" = "yes" ||  test "$with_accelerated_compositing" = "opengl" ; then
     AC_CHECK_HEADERS([GL/gl.h], [], AC_MSG_ERROR([OpenGL header not found]))
     AC_CHECK_HEADERS([GL/glx.h], [], AC_MSG_ERROR([GLX header not found]))
     OPENGL_LIBS="-lGL -ldl"
@@ -1148,7 +1148,10 @@ AM_CONDITIONAL([USE_PANGO], [test "$with_font_backend" = "pango"])
 AM_CONDITIONAL([USE_GSTREAMER], [test "$have_gstreamer" = "yes"])
 
 # Accelerated compositing conditional
-AM_CONDITIONAL([USE_ACCELERATED_COMPOSITING], [test "$with_accelerated_compositing" = "yes"])
+AM_CONDITIONAL([USE_ACCELERATED_COMPOSITING], [test "$with_accelerated_compositing" = "cairo"])
+AM_CONDITIONAL([USE_ACCELERATED_COMPOSITING], [test "$with_accelerated_compositing" = "opengl"])
+AM_CONDITIONAL([USE_TEXTURE_MAPPER_CAIRO], [test "$with_accelerated_compositing" = "cairo"])
+AM_CONDITIONAL([USE_TEXTURE_MAPPER_GL], [test "$with_accelerated_compositing" = "opengl"])
 
 # WebKit feature conditionals
 AM_CONDITIONAL([ENABLE_DEBUG],[test "$enable_debug_features" = "yes"])