Title: [112354] trunk/Tools
Revision
112354
Author
[email protected]
Date
2012-03-27 19:06:54 -0700 (Tue, 27 Mar 2012)

Log Message

[chromium] Fix --enabled-threaded-compositing flag in DRT
https://bugs.webkit.org/show_bug.cgi?id=82405

Reviewed by James Robinson.

--enable-threaded-compositing wasn't working because there was no way
to set the value before it was used in the TestShell constructor.

To avoid adding yet another boolean parameter to TestShell's
constructor, add an explicit initialize function that can operate on
any boolean settings that are set post-constructor.

* DumpRenderTree/chromium/DumpRenderTree.cpp:
(main):
* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::TestShell):
(TestShell::initialize):
* DumpRenderTree/chromium/TestShell.h:
(TestShell):
(TestShell::setTestShellMode):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (112353 => 112354)


--- trunk/Tools/ChangeLog	2012-03-28 02:02:18 UTC (rev 112353)
+++ trunk/Tools/ChangeLog	2012-03-28 02:06:54 UTC (rev 112354)
@@ -1,3 +1,26 @@
+2012-03-27  Adrienne Walker  <[email protected]>
+
+        [chromium] Fix --enabled-threaded-compositing flag in DRT
+        https://bugs.webkit.org/show_bug.cgi?id=82405
+
+        Reviewed by James Robinson.
+
+        --enable-threaded-compositing wasn't working because there was no way
+        to set the value before it was used in the TestShell constructor.
+
+        To avoid adding yet another boolean parameter to TestShell's
+        constructor, add an explicit initialize function that can operate on
+        any boolean settings that are set post-constructor.
+
+        * DumpRenderTree/chromium/DumpRenderTree.cpp:
+        (main):
+        * DumpRenderTree/chromium/TestShell.cpp:
+        (TestShell::TestShell):
+        (TestShell::initialize):
+        * DumpRenderTree/chromium/TestShell.h:
+        (TestShell):
+        (TestShell::setTestShellMode):
+
 2012-03-27  Dirk Pranke  <[email protected]>
 
         new-run-webkit-tests: suppress debug output from run-safari on results file

Modified: trunk/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp (112353 => 112354)


--- trunk/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp	2012-03-28 02:02:18 UTC (rev 112353)
+++ trunk/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp	2012-03-28 02:06:54 UTC (rev 112354)
@@ -234,7 +234,8 @@
         openStartupDialog();
 
     { // Explicit scope for the TestShell instance.
-        TestShell shell(testShellMode);
+        TestShell shell;
+        shell.setTestShellMode(testShellMode);
         shell.setAllowExternalPages(allowExternalPages);
         shell.setAcceleratedCompositingForVideoEnabled(acceleratedCompositingForVideoEnabled);
         shell.setThreadedCompositingEnabled(threadedCompositingEnabled);
@@ -251,6 +252,7 @@
             // 0x20000000ms is big enough for the purpose to avoid timeout in debugging.
             shell.setLayoutTestTimeout(0x20000000);
         }
+        shell.initialize();
         if (serverMode && !tests.size()) {
 #if OS(ANDROID)
             // Send a signal to host to indicate DRT is ready to process commands.

Modified: trunk/Tools/DumpRenderTree/chromium/TestShell.cpp (112353 => 112354)


--- trunk/Tools/DumpRenderTree/chromium/TestShell.cpp	2012-03-28 02:02:18 UTC (rev 112353)
+++ trunk/Tools/DumpRenderTree/chromium/TestShell.cpp	2012-03-28 02:06:54 UTC (rev 112354)
@@ -98,11 +98,11 @@
     }
 }
 
-TestShell::TestShell(bool testShellMode)
+TestShell::TestShell()
     : m_testIsPending(false)
     , m_testIsPreparing(false)
     , m_focusedWidget(0)
-    , m_testShellMode(testShellMode)
+    , m_testShellMode(false)
     , m_devTools(0)
     , m_allowExternalPages(false)
     , m_acceleratedCompositingForVideoEnabled(false)
@@ -131,7 +131,10 @@
     WebRuntimeFeatures::enableShadowDOM(true);
     WebRuntimeFeatures::enableStyleScoped(true);
     WebRuntimeFeatures::enableScriptedSpeech(true);
+}
 
+void TestShell::initialize()
+{
     m_webPermissions = adoptPtr(new WebPermissions(this));
     m_accessibilityController = adoptPtr(new AccessibilityController(this));
     m_gamepadController = adoptPtr(new GamepadController(this));
@@ -151,7 +154,6 @@
     } else
         WebCompositor::initialize(0);
 
-
     // 30 second is the same as the value in Mac DRT.
     // If we use a value smaller than the timeout value of
     // (new-)run-webkit-tests, (new-)run-webkit-tests misunderstands that a

Modified: trunk/Tools/DumpRenderTree/chromium/TestShell.h (112353 => 112354)


--- trunk/Tools/DumpRenderTree/chromium/TestShell.h	2012-03-28 02:02:18 UTC (rev 112353)
+++ trunk/Tools/DumpRenderTree/chromium/TestShell.h	2012-03-28 02:06:54 UTC (rev 112354)
@@ -82,9 +82,11 @@
 
 class TestShell {
 public:
-    TestShell(bool testShellMode);
+    TestShell();
     ~TestShell();
 
+    void initialize();
+
     // The main WebView.
     WebKit::WebView* webView() const { return m_webView; }
     // Returns the host for the main WebView.
@@ -130,6 +132,7 @@
     bool allowExternalPages() const { return m_allowExternalPages; }
     void setAllowExternalPages(bool allowExternalPages) { m_allowExternalPages = allowExternalPages; }
 
+    void setTestShellMode(bool testShellMode) { m_testShellMode = testShellMode; }
     void setAcceleratedCompositingForVideoEnabled(bool enabled) { m_acceleratedCompositingForVideoEnabled = enabled; }
     void setThreadedCompositingEnabled(bool enabled) { m_threadedCompositingEnabled = enabled; }
     void setCompositeToTexture(bool enabled) { m_compositeToTexture = enabled; }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to