2011-04-20 W. James MacLean <wjmaclean@chromium.org>
authorwjmaclean@chromium.org <wjmaclean@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Apr 2011 13:17:01 +0000 (13:17 +0000)
committerwjmaclean@chromium.org <wjmaclean@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Apr 2011 13:17:01 +0000 (13:17 +0000)
        Reviewed by Kenneth Russell.

        Add support for composite-to-texture to DumpRenderTree.
        https://bugs.webkit.org/show_bug.cgi?id=58675

        * DumpRenderTree/chromium/DumpRenderTree.cpp:
        (main):
        * DumpRenderTree/chromium/TestShell.cpp:
        (TestShell::TestShell):
        (TestShell::resetWebSettings):
        * DumpRenderTree/chromium/TestShell.h:
        (TestShell::setCompositeToTexture):
        * DumpRenderTree/chromium/WebPreferences.cpp:
        (WebPreferences::reset):
        (WebPreferences::applyTo):
        * DumpRenderTree/chromium/WebPreferences.h:

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

Tools/ChangeLog
Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
Tools/DumpRenderTree/chromium/TestShell.cpp
Tools/DumpRenderTree/chromium/TestShell.h
Tools/DumpRenderTree/chromium/WebPreferences.cpp
Tools/DumpRenderTree/chromium/WebPreferences.h

index 8d1a1aa..8a1af4c 100644 (file)
@@ -1,3 +1,22 @@
+2011-04-20  W. James MacLean  <wjmaclean@chromium.org>
+
+        Reviewed by Kenneth Russell.
+
+        Add support for composite-to-texture to DumpRenderTree.
+        https://bugs.webkit.org/show_bug.cgi?id=58675
+
+        * DumpRenderTree/chromium/DumpRenderTree.cpp:
+        (main):
+        * DumpRenderTree/chromium/TestShell.cpp:
+        (TestShell::TestShell):
+        (TestShell::resetWebSettings):
+        * DumpRenderTree/chromium/TestShell.h:
+        (TestShell::setCompositeToTexture):
+        * DumpRenderTree/chromium/WebPreferences.cpp:
+        (WebPreferences::reset):
+        (WebPreferences::applyTo):
+        * DumpRenderTree/chromium/WebPreferences.h:
+
 2011-04-19  Eric Seidel  <eric@webkit.org>
 
         Reviewed by Adam Barth.
index 95fcd58..c9d3875 100644 (file)
@@ -56,6 +56,7 @@ static const char optionHardwareAcceleratedGL[] = "--enable-hardware-gpu";
 static const char optionEnableAcceleratedCompositing[] = "--enable-accelerated-compositing";
 static const char optionForceCompositingMode[] = "--force-compositing-mode";
 static const char optionEnableAccelerated2DCanvas[] = "--enable-accelerated-2d-canvas";
+static const char optionEnableCompositeToTexture[] = "--enable-composite-to-texture";
 
 static const char optionStressOpt[] = "--stress-opt";
 static const char optionStressDeopt[] = "--stress-deopt";
@@ -133,6 +134,7 @@ int main(int argc, char* argv[])
     bool allowExternalPages = false;
     bool startupDialog = false;
     bool acceleratedCompositingEnabled = false;
+    bool compositeToTexture = false;
     bool forceCompositingMode = false;
     bool accelerated2DCanvasEnabled = false;
     bool stressOpt = false;
@@ -168,6 +170,8 @@ int main(int argc, char* argv[])
             hardwareAcceleratedGL = true;
         else if (argument == optionEnableAcceleratedCompositing)
             acceleratedCompositingEnabled = true;
+        else if (argument == optionEnableCompositeToTexture)
+            compositeToTexture = true;
         else if (argument == optionForceCompositingMode)
             forceCompositingMode = true;
         else if (argument == optionEnableAccelerated2DCanvas)
@@ -203,6 +207,7 @@ int main(int argc, char* argv[])
         TestShell shell(testShellMode);
         shell.setAllowExternalPages(allowExternalPages);
         shell.setAcceleratedCompositingEnabled(acceleratedCompositingEnabled);
+        shell.setCompositeToTexture(compositeToTexture);
         shell.setForceCompositingMode(forceCompositingMode);
         shell.setAccelerated2dCanvasEnabled(accelerated2DCanvasEnabled);
         shell.setJavaScriptFlags(javaScriptFlags);
index 4a092e7..be9fb05 100644 (file)
@@ -99,6 +99,7 @@ TestShell::TestShell(bool testShellMode)
     , m_devTools(0)
     , m_allowExternalPages(false)
     , m_acceleratedCompositingEnabled(false)
+    , m_compositeToTexture(false)
     , m_forceCompositingMode(false)
     , m_accelerated2dCanvasEnabled(false)
     , m_stressOpt(false)
@@ -178,6 +179,7 @@ void TestShell::resetWebSettings(WebView& webView)
 {
     m_prefs.reset();
     m_prefs.acceleratedCompositingEnabled = m_acceleratedCompositingEnabled;
+    m_prefs.compositeToTexture = m_compositeToTexture;
     m_prefs.forceCompositingMode = m_forceCompositingMode;
     m_prefs.accelerated2dCanvasEnabled = m_accelerated2dCanvasEnabled;
     m_prefs.applyTo(&webView);
index 10d6909..7e99a4c 100644 (file)
@@ -126,6 +126,7 @@ public:
     void setAllowExternalPages(bool allowExternalPages) { m_allowExternalPages = allowExternalPages; }
 
     void setAcceleratedCompositingEnabled(bool enabled) { m_acceleratedCompositingEnabled = enabled; }
+    void setCompositeToTexture(bool enabled) { m_compositeToTexture = enabled; }
     void setForceCompositingMode(bool enabled) { m_forceCompositingMode = enabled; }
     void setAccelerated2dCanvasEnabled(bool enabled) { m_accelerated2dCanvasEnabled = enabled; }
 
@@ -202,6 +203,7 @@ private:
     int m_timeout; // timeout value in millisecond
     bool m_allowExternalPages;
     bool m_acceleratedCompositingEnabled;
+    bool m_compositeToTexture;
     bool m_forceCompositingMode;
     bool m_accelerated2dCanvasEnabled;
     WebPreferences m_prefs;
index c609397..f5556f4 100644 (file)
@@ -103,6 +103,7 @@ void WebPreferences::reset()
     tabsToLinks = false;
     hyperlinkAuditingEnabled = false;
     acceleratedCompositingEnabled = false;
+    compositeToTexture = false;
     accelerated2dCanvasEnabled = false;
     forceCompositingMode = false;
 }
@@ -150,6 +151,7 @@ void WebPreferences::applyTo(WebView* webView)
     webView->setTabsToLinks(tabsToLinks);
     settings->setCaretBrowsingEnabled(caretBrowsingEnabled);
     settings->setAcceleratedCompositingEnabled(acceleratedCompositingEnabled);
+    settings->setCompositeToTextureEnabled(compositeToTexture);
     settings->setForceCompositingMode(forceCompositingMode);
     settings->setAccelerated2dCanvasEnabled(accelerated2dCanvasEnabled);
 
index ad27fb8..c85a487 100644 (file)
@@ -78,6 +78,7 @@ struct WebPreferences {
     bool hyperlinkAuditingEnabled;
     bool caretBrowsingEnabled;
     bool acceleratedCompositingEnabled;
+    bool compositeToTexture;
     bool forceCompositingMode;
     bool accelerated2dCanvasEnabled;