[Qt] Enable CSS shaders in Qt (software mode)
authornoam.rosenthal@nokia.com <noam.rosenthal@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jul 2012 21:54:19 +0000 (21:54 +0000)
committernoam.rosenthal@nokia.com <noam.rosenthal@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jul 2012 21:54:19 +0000 (21:54 +0000)
https://bugs.webkit.org/show_bug.cgi?id=85140

Reviewed by Simon Hausmann.

Source/WebCore:

Added missing files to the Qt build.

No new tests, WebGL is still disabled by default in the bots.

* Target.pri:

Source/WebKit/qt:

Enable CSS Shaders in settings when WebGL is enabled.

* Api/qwebsettings.cpp:
(QWebSettingsPrivate::apply):

Source/WebKit2:

Add CSSCustomFilterEnabled to QWebPreferences. It's disabled by default.

* UIProcess/API/qt/qwebpreferences.cpp:
(QWebPreferencesPrivate::testAttribute):
(QWebPreferencesPrivate::setAttribute):
* UIProcess/API/qt/qwebpreferences_p_p.h:

Tools:

Enable CSS_SHADERS when WEBGL and CSS_FILTERS are enabled.

* qmake/mkspecs/features/features.prf:

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

Source/WebCore/ChangeLog
Source/WebCore/Target.pri
Source/WebKit/qt/Api/qwebsettings.cpp
Source/WebKit/qt/ChangeLog
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp
Source/WebKit2/UIProcess/API/qt/qwebpreferences_p_p.h
Tools/ChangeLog
Tools/qmake/mkspecs/features/features.prf

index 7c2c978..0c40bee 100644 (file)
@@ -1,3 +1,16 @@
+2012-07-19  No'am Rosenthal  <noam.rosenthal@nokia.com>
+
+        [Qt] Enable CSS shaders in Qt (software mode)
+        https://bugs.webkit.org/show_bug.cgi?id=85140
+
+        Reviewed by Simon Hausmann.
+
+        Added missing files to the Qt build.
+
+        No new tests, WebGL is still disabled by default in the bots.
+
+        * Target.pri:
+
 2012-07-17  Dmitry Titov  <dimich@chromium.org>
 
         [Chromium] Out of Memory is observed when a large object is passed to a Web Worker.
index 3244bbc..23bc2d0 100644 (file)
@@ -3679,6 +3679,8 @@ contains(DEFINES, WTF_USE_3D_GRAPHICS=1) {
         platform/graphics/Extensions3D.h \
         platform/graphics/GraphicsContext3D.h \
         platform/graphics/gpu/DrawingBuffer.h \
+        platform/graphics/gpu/Texture.h \
+        platform/graphics/gpu/TilingData.h \
         platform/graphics/opengl/Extensions3DOpenGL.h \
         platform/graphics/texmap/TextureMapperGL.h \
         platform/graphics/texmap/TextureMapperShaderManager.h
@@ -3688,6 +3690,8 @@ contains(DEFINES, WTF_USE_3D_GRAPHICS=1) {
         platform/graphics/GraphicsContext3D.cpp \
         platform/graphics/gpu/DrawingBuffer.cpp \
         platform/graphics/gpu/qt/DrawingBufferQt.cpp \
+        platform/graphics/gpu/Texture.cpp \
+        platform/graphics/gpu/TilingData.cpp \
         platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp \
         platform/graphics/opengl/Extensions3DOpenGLCommon.cpp \
         platform/graphics/qt/GraphicsContext3DQt.cpp \
index 96e2b0c..588dcf7 100644 (file)
@@ -162,6 +162,10 @@ void QWebSettingsPrivate::apply()
                                  global->attributes.value(QWebSettings::WebGLEnabled));
 
         settings->setWebGLEnabled(value);
+#if ENABLE(CSS_SHADERS)
+        // For now, enable CSS shaders when WebGL is enabled.
+        settings->setCSSCustomFilterEnabled(value);
+#endif
 #if USE(ACCELERATED_COMPOSITING)
         settings->setAcceleratedCompositingForCanvasEnabled(value);
 #endif
index 5dc902d..4b8fefe 100644 (file)
@@ -1,3 +1,15 @@
+2012-07-19  No'am Rosenthal  <noam.rosenthal@nokia.com>
+
+        [Qt] Enable CSS shaders in Qt (software mode)
+        https://bugs.webkit.org/show_bug.cgi?id=85140
+
+        Reviewed by Simon Hausmann.
+
+        Enable CSS Shaders in settings when WebGL is enabled.
+
+        * Api/qwebsettings.cpp:
+        (QWebSettingsPrivate::apply):
+
 2012-07-19  Simon Hausmann  <simon.hausmann@nokia.com>
 
         [Qt] Remove support for Qt versions before 4.8.0
index 9b1e9ca..5a75ebd 100644 (file)
@@ -1,3 +1,17 @@
+2012-07-19  No'am Rosenthal  <noam.rosenthal@nokia.com>
+
+        [Qt] Enable CSS shaders in Qt (software mode)
+        https://bugs.webkit.org/show_bug.cgi?id=85140
+
+        Reviewed by Simon Hausmann.
+
+        Add CSSCustomFilterEnabled to QWebPreferences. It's disabled by default.
+
+        * UIProcess/API/qt/qwebpreferences.cpp:
+        (QWebPreferencesPrivate::testAttribute):
+        (QWebPreferencesPrivate::setAttribute):
+        * UIProcess/API/qt/qwebpreferences_p_p.h:
+
 2012-07-19  Pierre Rossi  <pierre.rossi@gmail.com>
 
         [Qt][WK2] Map the elementRect exposed in QML to the view for popup menu
index 9a30e1f..e66f368 100644 (file)
@@ -66,6 +66,10 @@ bool QWebPreferencesPrivate::testAttribute(QWebPreferencesPrivate::WebAttribute
 #if ENABLE(WEBGL)
     case WebGLEnabled:
         return WKPreferencesGetWebGLEnabled(preferencesRef());
+#if ENABLE(CSS_SHADERS)
+    case CSSCustomFilterEnabled:
+        return WKPreferencesGetCSSCustomFilterEnabled(preferencesRef());
+#endif
 #endif
     default:
         ASSERT_NOT_REACHED();
@@ -114,6 +118,11 @@ void QWebPreferencesPrivate::setAttribute(QWebPreferencesPrivate::WebAttribute a
     case WebGLEnabled:
         WKPreferencesSetWebGLEnabled(preferencesRef(), enable);
         break;
+#if ENABLE(CSS_SHADERS)
+    case CSSCustomFilterEnabled:
+        WKPreferencesSetCSSCustomFilterEnabled(preferencesRef(), enable);
+        break;
+#endif
 #endif
     default:
         ASSERT_NOT_REACHED();
index 7c1c9bd..004500c 100644 (file)
@@ -39,7 +39,8 @@ public:
         PrivateBrowsingEnabled,
         DnsPrefetchEnabled,
         DeveloperExtrasEnabled,
-        WebGLEnabled
+        WebGLEnabled,
+        CSSCustomFilterEnabled
     };
 
     enum FontFamily {
index 27c2d10..437f267 100644 (file)
@@ -1,3 +1,14 @@
+2012-07-19  No'am Rosenthal  <noam.rosenthal@nokia.com>
+
+        [Qt] Enable CSS shaders in Qt (software mode)
+        https://bugs.webkit.org/show_bug.cgi?id=85140
+
+        Reviewed by Simon Hausmann.
+
+        Enable CSS_SHADERS when WEBGL and CSS_FILTERS are enabled.
+
+        * qmake/mkspecs/features/features.prf:
+
 2012-07-19  Dirk Pranke  <dpranke@chromium.org>
 
         test-webkitpy: fix executive_unittest nits, including a missing 'errno' import
index a7b0086..56c400d 100644 (file)
@@ -112,6 +112,12 @@ haveQt(4)|haveQtModule(widgets): DEFINES += HAVE_QSTYLE=1
     contains(QT_CONFIG, opengl):!win32-*: DEFINES += ENABLE_WEBGL=1
 }
 
+# CSS Shaders support
+!contains(DEFINES, ENABLE_CSS_SHADERS=.) {
+    # Enable CSS shaders when CSS filters and WebGL are enabled.
+    contains(DEFINES, ENABLE_CSS_FILTERS=1):contains(DEFINES, ENABLE_WEBGL=1): DEFINES += ENABLE_CSS_SHADERS=1
+}
+
 !contains(DEFINES, ENABLE_XSLT=.) {
     # Using QtXmlPatterns
     contains(QT_CONFIG, xmlpatterns): DEFINES += ENABLE_XSLT=1