Title: [98445] trunk/Source
Revision
98445
Author
yu...@chromium.org
Date
2011-10-26 01:24:51 -0700 (Wed, 26 Oct 2011)

Log Message

Unreviewed, rolling out r98429.
http://trac.webkit.org/changeset/98429
https://bugs.webkit.org/show_bug.cgi?id=70881

"webkit_gpu_tests fail in Chromium" (Requested by yurys on
#webkit).

Patch by Sheriff Bot <webkit.review....@gmail.com> on 2011-10-26

Source/WebCore:

* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::initialize):
* platform/graphics/chromium/WebGLLayerChromium.cpp:
(WebCore::WebGLLayerChromium::layerRendererContext):
* platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
(WebCore::CCHeadsUpDisplay::enabled):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::initialize):
(WebCore::CCLayerTreeHost::context):
(WebCore::CCLayerTreeHost::setNeedsAnimate):
(WebCore::CCLayerTreeHost::setNeedsCommitThenRedraw):
(WebCore::CCLayerTreeHost::setNeedsRedraw):
(WebCore::CCLayerTreeHost::composite):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCSettings::CCSettings):
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::setThread):
* platform/graphics/chromium/cc/CCThreadProxy.h:

Source/WebKit/chromium:

* public/WebLayerTreeView.h:
* src/WebCompositorImpl.cpp:
(WebKit::WebCompositor::setThread):
* src/WebLayerTreeView.cpp:
(WebKit::WebLayerTreeView::Settings::operator CCSettings):
(WebKit::WebLayerTreeView::composite):
* src/WebLayerTreeViewImpl.cpp:
(WebKit::WebLayerTreeViewImpl::createLayerTreeHostContext3D):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
* tests/CCLayerTreeHostTest.cpp:
(WTF::CCLayerTreeHostTest::CCLayerTreeHostTest):
(WTF::CCLayerTreeHostTest::runTest):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (98444 => 98445)


--- trunk/Source/WebCore/ChangeLog	2011-10-26 08:13:01 UTC (rev 98444)
+++ trunk/Source/WebCore/ChangeLog	2011-10-26 08:24:51 UTC (rev 98445)
@@ -1,3 +1,31 @@
+2011-10-26  Sheriff Bot  <webkit.review....@gmail.com>
+
+        Unreviewed, rolling out r98429.
+        http://trac.webkit.org/changeset/98429
+        https://bugs.webkit.org/show_bug.cgi?id=70881
+
+        "webkit_gpu_tests fail in Chromium" (Requested by yurys on
+        #webkit).
+
+        * platform/graphics/chromium/LayerRendererChromium.cpp:
+        (WebCore::LayerRendererChromium::initialize):
+        * platform/graphics/chromium/WebGLLayerChromium.cpp:
+        (WebCore::WebGLLayerChromium::layerRendererContext):
+        * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
+        (WebCore::CCHeadsUpDisplay::enabled):
+        * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
+        (WebCore::CCLayerTreeHost::initialize):
+        (WebCore::CCLayerTreeHost::context):
+        (WebCore::CCLayerTreeHost::setNeedsAnimate):
+        (WebCore::CCLayerTreeHost::setNeedsCommitThenRedraw):
+        (WebCore::CCLayerTreeHost::setNeedsRedraw):
+        (WebCore::CCLayerTreeHost::composite):
+        * platform/graphics/chromium/cc/CCLayerTreeHost.h:
+        (WebCore::CCSettings::CCSettings):
+        * platform/graphics/chromium/cc/CCThreadProxy.cpp:
+        (WebCore::CCThreadProxy::setThread):
+        * platform/graphics/chromium/cc/CCThreadProxy.h:
+
 2011-10-26  Ben Wells  <benwe...@chromium.org>
 
         Canvas drawImage with SourceIn, DestinationIn, SourceOut, DestinationAtop and Copy have errors

Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp (98444 => 98445)


--- trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp	2011-10-26 08:13:01 UTC (rev 98444)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp	2011-10-26 08:24:51 UTC (rev 98445)
@@ -190,7 +190,7 @@
         extensions->ensureEnabled("GL_CHROMIUM_map_sub");
 
     // Use the swapBuffers callback only with the threaded proxy.
-    if (CCThreadProxy::hasThread())
+    if (settings().enableCompositorThread)
         m_capabilities.usingSwapCompleteCallback = extensions->supports("GL_CHROMIUM_swapbuffers_complete_callback");
     if (m_capabilities.usingSwapCompleteCallback) {
         extensions->ensureEnabled("GL_CHROMIUM_swapbuffers_complete_callback");

Modified: trunk/Source/WebCore/platform/graphics/chromium/WebGLLayerChromium.cpp (98444 => 98445)


--- trunk/Source/WebCore/platform/graphics/chromium/WebGLLayerChromium.cpp	2011-10-26 08:13:01 UTC (rev 98444)
+++ trunk/Source/WebCore/platform/graphics/chromium/WebGLLayerChromium.cpp	2011-10-26 08:24:51 UTC (rev 98445)
@@ -38,7 +38,6 @@
 #include "GraphicsContext3D.h"
 #include "LayerRendererChromium.h"
 #include "TraceEvent.h"
-#include "cc/CCThreadProxy.h"
 
 namespace WebCore {
 
@@ -150,7 +149,7 @@
 {
     // FIXME: In the threaded case, paintRenderedResultsToCanvas must be
     // refactored to be asynchronous. Currently this is unimplemented.
-    if (!layerTreeHost() || CCThreadProxy::hasThread())
+    if (!layerTreeHost() || layerTreeHost()->settings().enableCompositorThread)
         return 0;
     return layerTreeHost()->context();
 }

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp (98444 => 98445)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp	2011-10-26 08:13:01 UTC (rev 98444)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp	2011-10-26 08:24:51 UTC (rev 98445)
@@ -39,7 +39,6 @@
 #include "TextRun.h"
 #include "TextStream.h"
 #include "TextureManager.h"
-#include "cc/CCThreadProxy.h"
 #include <wtf/CurrentTime.h>
 #include <wtf/text/CString.h>
 #include <wtf/text/WTFString.h>
@@ -91,7 +90,7 @@
 bool CCHeadsUpDisplay::enabled() const
 {
     // FIXME: HUD does not work in compositor thread mode.
-    if (CCThreadProxy::hasThread())
+    if (settings().enableCompositorThread)
         return false;
     return settings().showPlatformLayerTree || settings().showFPSCounter;
 }

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp (98444 => 98445)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp	2011-10-26 08:13:01 UTC (rev 98444)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp	2011-10-26 08:24:51 UTC (rev 98445)
@@ -64,7 +64,7 @@
 bool CCLayerTreeHost::initialize()
 {
     TRACE_EVENT("CCLayerTreeHost::initialize", this, 0);
-    if (CCThreadProxy::hasThread()) {
+    if (m_settings.enableCompositorThread) {
         // The HUD does not work in threaded mode. Turn it off.
         m_settings.showFPSCounter = false;
         m_settings.showPlatformLayerTree = false;
@@ -166,7 +166,7 @@
 // Temporary hack until WebViewImpl context creation gets simplified
 GraphicsContext3D* CCLayerTreeHost::context()
 {
-    ASSERT(!CCThreadProxy::hasThread());
+    ASSERT(!m_settings.enableCompositorThread);
     return m_proxy->context();
 }
 
@@ -197,15 +197,13 @@
 
 void CCLayerTreeHost::setNeedsAnimate()
 {
-    if (CCThreadProxy::hasThread())
-        m_proxy->setNeedsAnimate();
-    else
-        m_client->scheduleComposite();
+    ASSERT(m_settings.enableCompositorThread);
+    m_proxy->setNeedsAnimate();
 }
 
 void CCLayerTreeHost::setNeedsCommitThenRedraw()
 {
-    if (CCThreadProxy::hasThread()) {
+    if (m_settings.enableCompositorThread) {
         TRACE_EVENT("CCLayerTreeHost::setNeedsRedraw", this, 0);
         m_proxy->setNeedsCommitThenRedraw();
     } else
@@ -214,7 +212,7 @@
 
 void CCLayerTreeHost::setNeedsRedraw()
 {
-    if (CCThreadProxy::hasThread())
+    if (m_settings.enableCompositorThread)
         m_proxy->setNeedsRedraw();
     else
         m_client->scheduleComposite();
@@ -250,7 +248,7 @@
 
 void CCLayerTreeHost::composite()
 {
-    ASSERT(!CCThreadProxy::hasThread());
+    ASSERT(!m_settings.enableCompositorThread);
     static_cast<CCSingleThreadProxy*>(m_proxy.get())->compositeImmediately();
 }
 

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h (98444 => 98445)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h	2011-10-26 08:13:01 UTC (rev 98444)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h	2011-10-26 08:24:51 UTC (rev 98445)
@@ -67,11 +67,13 @@
     CCSettings()
             : acceleratePainting(false)
             , compositeOffscreen(false)
+            , enableCompositorThread(false)
             , showFPSCounter(false)
             , showPlatformLayerTree(false) { }
 
     bool acceleratePainting;
     bool compositeOffscreen;
+    bool enableCompositorThread;
     bool showFPSCounter;
     bool showPlatformLayerTree;
 };

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp (98444 => 98445)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp	2011-10-26 08:13:01 UTC (rev 98444)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp	2011-10-26 08:24:51 UTC (rev 98445)
@@ -45,16 +45,11 @@
 
 CCThread* CCThreadProxy::s_ccThread = 0;
 
-bool CCThreadProxy::hasThread()
-{
-    return s_ccThread;
-}
-
 void CCThreadProxy::setThread(CCThread* ccThread)
 {
     s_ccThread = ccThread;
 #ifndef NDEBUG
-    CCProxy::setImplThread(s_ccThread ? s_ccThread->threadID() : 0);
+    CCProxy::setImplThread(s_ccThread->threadID());
 #endif
 }
 

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.h (98444 => 98445)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.h	2011-10-26 08:13:01 UTC (rev 98444)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.h	2011-10-26 08:24:51 UTC (rev 98445)
@@ -43,7 +43,6 @@
 class CCThreadProxy : public CCProxy, CCLayerTreeHostImplClient {
     friend class CCThreadProxySchedulerClient;
 public:
-    static bool hasThread();
     static void setThread(CCThread*);
 
     static PassOwnPtr<CCProxy> create(CCLayerTreeHost*);

Modified: trunk/Source/WebKit/chromium/ChangeLog (98444 => 98445)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-10-26 08:13:01 UTC (rev 98444)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-10-26 08:24:51 UTC (rev 98445)
@@ -1,3 +1,26 @@
+2011-10-26  Sheriff Bot  <webkit.review....@gmail.com>
+
+        Unreviewed, rolling out r98429.
+        http://trac.webkit.org/changeset/98429
+        https://bugs.webkit.org/show_bug.cgi?id=70881
+
+        "webkit_gpu_tests fail in Chromium" (Requested by yurys on
+        #webkit).
+
+        * public/WebLayerTreeView.h:
+        * src/WebCompositorImpl.cpp:
+        (WebKit::WebCompositor::setThread):
+        * src/WebLayerTreeView.cpp:
+        (WebKit::WebLayerTreeView::Settings::operator CCSettings):
+        (WebKit::WebLayerTreeView::composite):
+        * src/WebLayerTreeViewImpl.cpp:
+        (WebKit::WebLayerTreeViewImpl::createLayerTreeHostContext3D):
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+        * tests/CCLayerTreeHostTest.cpp:
+        (WTF::CCLayerTreeHostTest::CCLayerTreeHostTest):
+        (WTF::CCLayerTreeHostTest::runTest):
+
 2011-10-26  Polina Sokolova  <pol...@chromium.org>
 
         Remove temporary hack needed to ease Chromium/WebKit commit.

Modified: trunk/Source/WebKit/chromium/public/WebLayerTreeView.h (98444 => 98445)


--- trunk/Source/WebKit/chromium/public/WebLayerTreeView.h	2011-10-26 08:13:01 UTC (rev 98444)
+++ trunk/Source/WebKit/chromium/public/WebLayerTreeView.h	2011-10-26 08:24:51 UTC (rev 98445)
@@ -49,8 +49,6 @@
 
         bool acceleratePainting;
         bool compositeOffscreen;
-        // FIXME: this field is ignored, but is currently in use by downstream code.
-        // Remove this field once downstream stops setting it.
         bool enableCompositorThread;
 #if WEBKIT_IMPLEMENTATION
         operator WebCore::CCSettings() const;

Modified: trunk/Source/WebKit/chromium/src/WebCompositorImpl.cpp (98444 => 98445)


--- trunk/Source/WebKit/chromium/src/WebCompositorImpl.cpp	2011-10-26 08:13:01 UTC (rev 98444)
+++ trunk/Source/WebKit/chromium/src/WebCompositorImpl.cpp	2011-10-26 08:24:51 UTC (rev 98445)
@@ -49,10 +49,8 @@
 
 void WebCompositor::setThread(WebThread* compositorThread)
 {
-    if (compositorThread)
-        CCThreadProxy::setThread(CCThreadImpl::create(compositorThread).leakPtr());
-    else
-        CCThreadProxy::setThread(0);
+    ASSERT(compositorThread);
+    CCThreadProxy::setThread(CCThreadImpl::create(compositorThread).leakPtr());
 }
 
 
@@ -129,3 +127,4 @@
 }
 
 }
+

Modified: trunk/Source/WebKit/chromium/src/WebLayerTreeView.cpp (98444 => 98445)


--- trunk/Source/WebKit/chromium/src/WebLayerTreeView.cpp	2011-10-26 08:13:01 UTC (rev 98444)
+++ trunk/Source/WebKit/chromium/src/WebLayerTreeView.cpp	2011-10-26 08:24:51 UTC (rev 98445)
@@ -29,7 +29,6 @@
 #include "WebLayerTreeViewImpl.h"
 #include "WebSize.h"
 #include "cc/CCLayerTreeHost.h"
-#include "cc/CCThreadProxy.h"
 
 using namespace WebCore;
 
@@ -39,6 +38,7 @@
     CCSettings settings;
     settings.acceleratePainting = acceleratePainting;
     settings.compositeOffscreen = compositeOffscreen;
+    settings.enableCompositorThread = enableCompositorThread;
 
     // FIXME: showFPSCounter / showPlatformLayerTree aren't supported currently.
     settings.showFPSCounter = false;
@@ -68,7 +68,7 @@
 
 void WebLayerTreeView::composite()
 {
-    if (CCThreadProxy::hasThread())
+    if (m_private->settings().enableCompositorThread)
         m_private->setNeedsCommitThenRedraw();
     else
         m_private->composite();

Modified: trunk/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp (98444 => 98445)


--- trunk/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp	2011-10-26 08:13:01 UTC (rev 98444)
+++ trunk/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp	2011-10-26 08:24:51 UTC (rev 98445)
@@ -35,7 +35,6 @@
 #include "WebLayerTreeViewClient.h"
 #include "WebSize.h"
 #include "WebThread.h"
-#include "cc/CCThreadProxy.h"
 
 using namespace WebCore;
 
@@ -92,7 +91,7 @@
     attributes.preserveDrawingBuffer = false;
 
     GraphicsContext3D::RenderStyle style = GraphicsContext3D::RenderDirectlyToHostWindow;
-    GraphicsContext3DPrivate::ThreadUsage usage = CCThreadProxy::hasThread() ? GraphicsContext3DPrivate::ForUseOnAnotherThread : GraphicsContext3DPrivate::ForUseOnThisThread;
+    GraphicsContext3DPrivate::ThreadUsage usage = settings().enableCompositorThread ? GraphicsContext3DPrivate::ForUseOnAnotherThread : GraphicsContext3DPrivate::ForUseOnThisThread;
     return GraphicsContext3DPrivate::createGraphicsContextFromWebContext(webContext.release(), attributes, 0, style, usage);
 }
 

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (98444 => 98445)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2011-10-26 08:13:01 UTC (rev 98444)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2011-10-26 08:24:51 UTC (rev 98445)
@@ -2678,6 +2678,7 @@
         WebCore::CCSettings ccSettings;
         ccSettings.acceleratePainting = page()->settings()->acceleratedDrawingEnabled();
         ccSettings.compositeOffscreen = settings()->compositeToTextureEnabled();
+        ccSettings.enableCompositorThread = settings()->useThreadedCompositor();
         ccSettings.showFPSCounter = settings()->showFPSCounter();
         ccSettings.showPlatformLayerTree = settings()->showPlatformLayerTree();
 

Modified: trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp (98444 => 98445)


--- trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp	2011-10-26 08:13:01 UTC (rev 98444)
+++ trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp	2011-10-26 08:24:51 UTC (rev 98445)
@@ -222,6 +222,13 @@
         , m_endWhenBeginReturns(false)
         , m_timedOut(false)
     {
+        m_webThread = adoptPtr(webKitPlatformSupport()->createThread("CCLayerTreeHostTest"));
+        WebCompositor::setThread(m_webThread.get());
+#ifndef NDEBUG
+        CCProxy::setMainThread(currentThread());
+#endif
+        ASSERT(CCProxy::isMainThread());
+        m_mainThreadProxy = CCScopedMainThreadProxy::create();
     }
 
     void doBeginTest();
@@ -289,18 +296,7 @@
 
     virtual void runTest(bool threaded)
     {
-        if (threaded) {
-            m_webThread = adoptPtr(webKitPlatformSupport()->createThread("CCLayerTreeHostTest"));
-            WebCompositor::setThread(m_webThread.get());
-        } else
-            WebCompositor::setThread(0);
-
-#ifndef NDEBUG
-        CCProxy::setMainThread(currentThread());
-#endif
-        ASSERT(CCProxy::isMainThread());
-        m_mainThreadProxy = CCScopedMainThreadProxy::create();
-
+        m_settings.enableCompositorThread = threaded;
         webkit_support::PostDelayedTask(CCLayerTreeHostTest::onBeginTest, static_cast<void*>(this), 0);
         m_timeoutTask = new TimeoutTask(this);
         webkit_support::PostDelayedTask(m_timeoutTask, 5000); // webkit_support takes ownership of the task
@@ -317,7 +313,6 @@
             return;
         }
         afterTest();
-        WebCompositor::setThread(0);
     }
 
     CCSettings m_settings;
@@ -758,3 +753,4 @@
 }
 
 } // namespace
+
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to