Title: [137256] trunk
Revision
137256
Author
[email protected]
Date
2012-12-10 23:45:17 -0800 (Mon, 10 Dec 2012)

Log Message

[chromium] Remove WebCompositorOutputSurface implementations from DRT
https://bugs.webkit.org/show_bug.cgi?id=104046

Reviewed by Darin Fisher.

Source/Platform:

Remove now-unused definitions for these classes. The cc::OutputSurface
and its related classes have replaced these, with the
WebCompositorOutputSurface class as an empty base class.

* Platform.gypi:
* chromium/public/WebCompositorOutputSurface.h:
(WebKit):
* chromium/public/WebCompositorOutputSurfaceClient.h: Removed.
* chromium/public/WebCompositorSoftwareOutputDevice.h: Removed.

Source/WebKit/chromium:

Use WebCompositorSupport to create an OutputSurface.

* WebKit.gypi:
* src/WebViewImpl.cpp:
(WebKit):
* tests/Canvas2DLayerBridgeTest.cpp:
* tests/FakeWebCompositorOutputSurface.h: Removed.
* tests/WebLayerTreeViewTestCommon.h:

Tools:

The classes are now provided through WebCompositorSupport.

* DumpRenderTree/DumpRenderTree.gypi:
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::createOutputSurface):
* DumpRenderTree/chromium/WebViewHostOutputSurface.cpp: Removed.
* DumpRenderTree/chromium/WebViewHostOutputSurface.h: Removed.
* DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.cpp: Removed.
* DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.h: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/Platform/ChangeLog (137255 => 137256)


--- trunk/Source/Platform/ChangeLog	2012-12-11 07:33:01 UTC (rev 137255)
+++ trunk/Source/Platform/ChangeLog	2012-12-11 07:45:17 UTC (rev 137256)
@@ -1,3 +1,20 @@
+2012-12-10  Dana Jansens  <[email protected]>
+
+        [chromium] Remove WebCompositorOutputSurface implementations from DRT
+        https://bugs.webkit.org/show_bug.cgi?id=104046
+
+        Reviewed by Darin Fisher.
+
+        Remove now-unused definitions for these classes. The cc::OutputSurface
+        and its related classes have replaced these, with the
+        WebCompositorOutputSurface class as an empty base class.
+
+        * Platform.gypi:
+        * chromium/public/WebCompositorOutputSurface.h:
+        (WebKit):
+        * chromium/public/WebCompositorOutputSurfaceClient.h: Removed.
+        * chromium/public/WebCompositorSoftwareOutputDevice.h: Removed.
+
 2012-12-10  Mark Pilgrim  <[email protected]>
 
         [Chromium] Move getPluginsList out of PlatformSupport

Modified: trunk/Source/Platform/Platform.gypi (137255 => 137256)


--- trunk/Source/Platform/Platform.gypi	2012-12-11 07:33:01 UTC (rev 137255)
+++ trunk/Source/Platform/Platform.gypi	2012-12-11 07:45:17 UTC (rev 137256)
@@ -45,9 +45,7 @@
             'chromium/public/WebColor.h',
             'chromium/public/WebCommon.h',
             'chromium/public/WebCompositorSupport.h',
-            'chromium/public/WebCompositorSoftwareOutputDevice.h',
             'chromium/public/WebCompositorOutputSurface.h',
-            'chromium/public/WebCompositorOutputSurfaceClient.h',
             'chromium/public/WebContentLayer.h',
             'chromium/public/WebContentLayerClient.h',
             'chromium/public/WebCookie.h',

Modified: trunk/Source/Platform/chromium/public/WebCompositorOutputSurface.h (137255 => 137256)


--- trunk/Source/Platform/chromium/public/WebCompositorOutputSurface.h	2012-12-11 07:33:01 UTC (rev 137255)
+++ trunk/Source/Platform/chromium/public/WebCompositorOutputSurface.h	2012-12-11 07:45:17 UTC (rev 137256)
@@ -28,52 +28,9 @@
 
 namespace WebKit {
 
-struct WebCompositorFrame;
-class WebGraphicsContext3D;
-class WebCompositorSoftwareOutputDevice;
-class WebCompositorOutputSurfaceClient;
-
-#ifdef USE_CC_OUTPUT_SURFACE
+// An empty base class for cc::OutputSurface in chromium.
 class WebCompositorOutputSurface { };
-#else
-// Represents the output surface for a compositor. The compositor owns
-// and manages its destruction. Its lifetime is:
-//   1. Created on the main thread via WebLayerTreeViewClient::createOutputSurface.
-//   2. Passed to the compositor thread and bound to a client via bindToClient.
-//      From here on, it will only be used on the compositor thread.
-//   3. If the 3D context is lost, then the compositor will delete the output surface
-//      (on the compositor thread) and go back to step 1.
-class WebCompositorOutputSurface {
-public:
-    virtual ~WebCompositorOutputSurface() { }
 
-    // Called by the compositor on the compositor thread. This is a place where thread-specific
-    // data for the output surface can be initialized, since from this point on the output surface
-    // will only be used on the compositor thread.
-    virtual bool bindToClient(WebCompositorOutputSurfaceClient*) = 0;
-
-    struct Capabilities {
-        Capabilities()
-            : hasParentCompositor(false)
-        {
-        }
-
-        bool hasParentCompositor;
-    };
-
-    virtual const Capabilities& capabilities() const = 0;
-
-    // Obtain the 3d context or the software device associated with this output surface. Either of these may return a null pointer, but not both.
-    // In the event of a lost context, the entire output surface should be recreated.
-    virtual WebGraphicsContext3D* context3D() const = 0;
-    virtual WebCompositorSoftwareOutputDevice* softwareDevice() const { return 0; }
-
-    // Sends frame data to the parent compositor. This should only be called
-    // when capabilities().hasParentCompositor.
-    virtual void sendFrameToParentCompositor(const WebCompositorFrame&) = 0;
-};
-#endif // USE_CC_COMPOSITOR_SURFACE
-
 }
 
 #endif

Deleted: trunk/Source/Platform/chromium/public/WebCompositorOutputSurfaceClient.h (137255 => 137256)


--- trunk/Source/Platform/chromium/public/WebCompositorOutputSurfaceClient.h	2012-12-11 07:33:01 UTC (rev 137255)
+++ trunk/Source/Platform/chromium/public/WebCompositorOutputSurfaceClient.h	2012-12-11 07:45:17 UTC (rev 137256)
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WebCompositorOutputSurfaceClient_h
-#define WebCompositorOutputSurfaceClient_h
-
-namespace WebKit {
-
-struct WebCompositorFrameAck;
-
-#ifndef USE_CC_OUTPUT_SURFACE
-class WebCompositorOutputSurfaceClient {
-public:
-    virtual void onVSyncParametersChanged(double monotonicTimebase, double intervalInSeconds) = 0;
-    virtual void onSendFrameToParentCompositorAck(const WebCompositorFrameAck&) { }
-
-protected:
-    ~WebCompositorOutputSurfaceClient() { }
-};
-#endif
-
-}
-
-#endif

Deleted: trunk/Source/Platform/chromium/public/WebCompositorSoftwareOutputDevice.h (137255 => 137256)


--- trunk/Source/Platform/chromium/public/WebCompositorSoftwareOutputDevice.h	2012-12-11 07:33:01 UTC (rev 137255)
+++ trunk/Source/Platform/chromium/public/WebCompositorSoftwareOutputDevice.h	2012-12-11 07:45:17 UTC (rev 137256)
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WebCompositorSoftwareOutputDevice_h
-#define WebCompositorSoftwareOutputDevice_h
-
-namespace WebKit {
-
-#ifndef USE_CC_SOFTWARE_OUTPUT_DEVICE
-class WebImage;
-struct WebSize;
-
-// This is a "tear-off" class providing software drawing support to
-// WebCompositorOutputSurface, such as to a platform-provided window
-// framebuffer.
-class WebCompositorSoftwareOutputDevice {
-public:
-    virtual ~WebCompositorSoftwareOutputDevice() { }
-
-    // Lock the framebuffer and return a pointer to a WebImage referring to its
-    // pixels. Set forWrite if you intend to change the pixels. Readback
-    // is supported whether or not forWrite is set.
-    virtual WebImage* lock(bool forWrite) = 0;
-    virtual void unlock() = 0;
-
-    virtual void didChangeViewportSize(WebSize) = 0;
-};
-#endif // USE_CC_SOFTWARE_OUTPUT_DEVICE
-
-}
-
-#endif

Modified: trunk/Source/WebKit/chromium/ChangeLog (137255 => 137256)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-12-11 07:33:01 UTC (rev 137255)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-12-11 07:45:17 UTC (rev 137256)
@@ -1,3 +1,19 @@
+2012-12-10  Dana Jansens  <[email protected]>
+
+        [chromium] Remove WebCompositorOutputSurface implementations from DRT
+        https://bugs.webkit.org/show_bug.cgi?id=104046
+
+        Reviewed by Darin Fisher.
+
+        Use WebCompositorSupport to create an OutputSurface.
+
+        * WebKit.gypi:
+        * src/WebViewImpl.cpp:
+        (WebKit):
+        * tests/Canvas2DLayerBridgeTest.cpp:
+        * tests/FakeWebCompositorOutputSurface.h: Removed.
+        * tests/WebLayerTreeViewTestCommon.h:
+
 2012-12-10  Stephen White  <[email protected]>
 
         [Chromium] Re-enable a failing test.  Disabling it just seemed to

Modified: trunk/Source/WebKit/chromium/WebKit.gypi (137255 => 137256)


--- trunk/Source/WebKit/chromium/WebKit.gypi	2012-12-11 07:33:01 UTC (rev 137255)
+++ trunk/Source/WebKit/chromium/WebKit.gypi	2012-12-11 07:45:17 UTC (rev 137256)
@@ -67,7 +67,6 @@
             'tests/EventListenerTest.cpp',
             'tests/FakeWebPlugin.cpp',
             'tests/FakeWebPlugin.h',
-            'tests/FakeWebCompositorOutputSurface.h',
             'tests/FakeWebGraphicsContext3D.h',
             'tests/FilterOperationsTest.cpp',
             'tests/FrameLoaderClientImplTest.cpp',

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (137255 => 137256)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-12-11 07:33:01 UTC (rev 137255)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-12-11 07:45:17 UTC (rev 137256)
@@ -4044,49 +4044,6 @@
 
 #endif
 
-namespace {
-
-// Adapts a pure WebGraphicsContext3D into a WebCompositorOutputSurface until
-// downstream code can be updated to produce output surfaces directly.
-class WebGraphicsContextToOutputSurfaceAdapter : public WebCompositorOutputSurface {
-public:
-    explicit WebGraphicsContextToOutputSurfaceAdapter(PassOwnPtr<WebGraphicsContext3D> context)
-        : m_context3D(context)
-        , m_client(0)
-    {
-    }
-
-    virtual bool bindToClient(WebCompositorOutputSurfaceClient* client) OVERRIDE
-    {
-        ASSERT(client);
-        if (!m_context3D->makeContextCurrent())
-            return false;
-        m_client = client;
-        return true;
-    }
-
-    virtual const Capabilities& capabilities() const OVERRIDE
-    {
-        return m_capabilities;
-    }
-
-    virtual WebGraphicsContext3D* context3D() const OVERRIDE
-    {
-        return m_context3D.get();
-    }
-
-    virtual void sendFrameToParentCompositor(const WebCompositorFrame&) OVERRIDE
-    {
-    }
-
-private:
-    OwnPtr<WebGraphicsContext3D> m_context3D;
-    Capabilities m_capabilities;
-    WebCompositorOutputSurfaceClient* m_client;
-};
-
-} // namespace
-
 WebCompositorOutputSurface* WebViewImpl::createOutputSurface()
 {
     return m_client->createOutputSurface();

Modified: trunk/Source/WebKit/chromium/tests/Canvas2DLayerBridgeTest.cpp (137255 => 137256)


--- trunk/Source/WebKit/chromium/tests/Canvas2DLayerBridgeTest.cpp	2012-12-11 07:33:01 UTC (rev 137255)
+++ trunk/Source/WebKit/chromium/tests/Canvas2DLayerBridgeTest.cpp	2012-12-11 07:45:17 UTC (rev 137256)
@@ -26,7 +26,6 @@
 
 #include "Canvas2DLayerBridge.h"
 
-#include "FakeWebCompositorOutputSurface.h"
 #include "FakeWebGraphicsContext3D.h"
 #include "GraphicsContext3DPrivate.h"
 #include "ImageBuffer.h"

Deleted: trunk/Source/WebKit/chromium/tests/FakeWebCompositorOutputSurface.h (137255 => 137256)


--- trunk/Source/WebKit/chromium/tests/FakeWebCompositorOutputSurface.h	2012-12-11 07:33:01 UTC (rev 137255)
+++ trunk/Source/WebKit/chromium/tests/FakeWebCompositorOutputSurface.h	2012-12-11 07:45:17 UTC (rev 137256)
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef FakeWebCompositorOutputSurface_h
-#define FakeWebCompositorOutputSurface_h
-
-#include <public/WebCompositorOutputSurface.h>
-#include <public/WebGraphicsContext3D.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-
-namespace WebKit {
-
-class FakeWebCompositorOutputSurface : public WebCompositorOutputSurface {
-public:
-    static inline PassOwnPtr<FakeWebCompositorOutputSurface> create(PassOwnPtr<WebGraphicsContext3D> context3D)
-    {
-        return adoptPtr(new FakeWebCompositorOutputSurface(context3D));
-    }
-
-
-    virtual bool bindToClient(WebCompositorOutputSurfaceClient* client) OVERRIDE
-    {
-        ASSERT(client);
-        if (!m_context3D->makeContextCurrent())
-            return false;
-        m_client = client;
-        return true;
-    }
-
-    virtual const Capabilities& capabilities() const OVERRIDE
-    {
-        return m_capabilities;
-    }
-
-    virtual WebGraphicsContext3D* context3D() const OVERRIDE
-    {
-        return m_context3D.get();
-    }
-
-    virtual void sendFrameToParentCompositor(const WebCompositorFrame&) OVERRIDE
-    {
-    }
-
-private:
-    explicit FakeWebCompositorOutputSurface(PassOwnPtr<WebGraphicsContext3D> context3D)
-    {
-        m_context3D = context3D;
-    }
-
-    OwnPtr<WebGraphicsContext3D> m_context3D;
-    Capabilities m_capabilities;
-    WebCompositorOutputSurfaceClient* m_client;
-};
-
-} // namespace WebKit
-
-#endif // FakeWebCompositorOutputSurface_h

Modified: trunk/Source/WebKit/chromium/tests/ScrollingCoordinatorChromiumTest.cpp (137255 => 137256)


--- trunk/Source/WebKit/chromium/tests/ScrollingCoordinatorChromiumTest.cpp	2012-12-11 07:33:01 UTC (rev 137255)
+++ trunk/Source/WebKit/chromium/tests/ScrollingCoordinatorChromiumTest.cpp	2012-12-11 07:45:17 UTC (rev 137256)
@@ -27,7 +27,6 @@
 #include "ScrollingCoordinator.h"
 
 #include "CompositorFakeWebGraphicsContext3D.h"
-#include "FakeWebCompositorOutputSurface.h"
 #include "FrameTestHelpers.h"
 #include "RenderLayerCompositor.h"
 #include "RenderView.h"
@@ -56,7 +55,7 @@
 public:
     virtual WebCompositorOutputSurface* createOutputSurface() OVERRIDE
     {
-        return FakeWebCompositorOutputSurface::create(CompositorFakeWebGraphicsContext3D::create(WebGraphicsContext3D::Attributes())).leakPtr();
+        return Platform::current()->compositorSupport()->createOutputSurfaceFor3D(CompositorFakeWebGraphicsContext3D::create(WebGraphicsContext3D::Attributes()).leakPtr());
     }
 };
 
@@ -69,6 +68,8 @@
         : m_baseURL("http://www.test.com/")
         , m_webCompositorInitializer(0)
     {
+        Platform::current()->compositorSupport()->initialize(0);
+
         // We cannot reuse FrameTestHelpers::createWebViewAndLoad here because the compositing
         // settings need to be set before the page is loaded.
         m_webViewImpl = static_cast<WebViewImpl*>(WebView::create(&m_mockWebViewClient));
@@ -85,6 +86,8 @@
     {
         webkit_support::UnregisterAllMockedURLs();
         m_webViewImpl->close();
+
+        Platform::current()->compositorSupport()->shutdown();
     }
 
     void navigateTo(const std::string& url)

Modified: trunk/Source/WebKit/chromium/tests/WebLayerTreeViewTestCommon.h (137255 => 137256)


--- trunk/Source/WebKit/chromium/tests/WebLayerTreeViewTestCommon.h	2012-12-11 07:33:01 UTC (rev 137255)
+++ trunk/Source/WebKit/chromium/tests/WebLayerTreeViewTestCommon.h	2012-12-11 07:45:17 UTC (rev 137256)
@@ -26,8 +26,9 @@
 #define WebLayerTreeViewTestCommon_h
 
 #include "CompositorFakeWebGraphicsContext3D.h"
-#include "FakeWebCompositorOutputSurface.h"
 #include <gmock/gmock.h>
+#include <public/Platform.h>
+#include <public/WebCompositorSupport.h>
 #include <public/WebLayerTreeViewClient.h>
 
 namespace WebKit {
@@ -43,7 +44,7 @@
 
     virtual WebCompositorOutputSurface* createOutputSurface() OVERRIDE
     {
-        return FakeWebCompositorOutputSurface::create(CompositorFakeWebGraphicsContext3D::create(WebGraphicsContext3D::Attributes())).leakPtr();
+        return Platform::current()->compositorSupport()->createOutputSurfaceFor3D(CompositorFakeWebGraphicsContext3D::create(WebGraphicsContext3D::Attributes()).leakPtr());
     }
     virtual void didRecreateOutputSurface(bool) OVERRIDE { }
 

Modified: trunk/Tools/ChangeLog (137255 => 137256)


--- trunk/Tools/ChangeLog	2012-12-11 07:33:01 UTC (rev 137255)
+++ trunk/Tools/ChangeLog	2012-12-11 07:45:17 UTC (rev 137256)
@@ -1,3 +1,20 @@
+2012-12-10  Dana Jansens  <[email protected]>
+
+        [chromium] Remove WebCompositorOutputSurface implementations from DRT
+        https://bugs.webkit.org/show_bug.cgi?id=104046
+
+        Reviewed by Darin Fisher.
+
+        The classes are now provided through WebCompositorSupport.
+
+        * DumpRenderTree/DumpRenderTree.gypi:
+        * DumpRenderTree/chromium/WebViewHost.cpp:
+        (WebViewHost::createOutputSurface):
+        * DumpRenderTree/chromium/WebViewHostOutputSurface.cpp: Removed.
+        * DumpRenderTree/chromium/WebViewHostOutputSurface.h: Removed.
+        * DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.cpp: Removed.
+        * DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.h: Removed.
+
 2012-12-10  Dirk Pranke  <[email protected]>
 
         change --no-launch-safari to --no-show-results in scripts

Modified: trunk/Tools/DumpRenderTree/DumpRenderTree.gypi (137255 => 137256)


--- trunk/Tools/DumpRenderTree/DumpRenderTree.gypi	2012-12-11 07:33:01 UTC (rev 137255)
+++ trunk/Tools/DumpRenderTree/DumpRenderTree.gypi	2012-12-11 07:45:17 UTC (rev 137256)
@@ -56,10 +56,6 @@
             'chromium/WebUserMediaClientMock.h',
             'chromium/WebViewHost.cpp',
             'chromium/WebViewHost.h',
-            'chromium/WebViewHostOutputSurface.cpp',
-            'chromium/WebViewHostOutputSurface.h',
-            'chromium/WebViewHostSoftwareOutputDevice.cpp',
-            'chromium/WebViewHostSoftwareOutputDevice.h',
         ],
         'test_runner_files': [
             'chromium/TestRunner/public/WebAccessibilityController.h',

Modified: trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp (137255 => 137256)


--- trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp	2012-12-11 07:33:01 UTC (rev 137255)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp	2012-12-11 07:45:17 UTC (rev 137256)
@@ -66,8 +66,6 @@
 #include "WebTextCheckingResult.h"
 #include "WebUserMediaClientMock.h"
 #include "WebView.h"
-#include "WebViewHostOutputSurface.h"
-#include "WebViewHostSoftwareOutputDevice.h"
 #include "WebWindowFeatures.h"
 #include "platform/WebSerializedScriptValue.h"
 #include "skia/ext/platform_canvas.h"
@@ -288,18 +286,11 @@
     if (!webView())
         return 0;
 
-    if (m_shell->softwareCompositingEnabled()) {
-        WebCompositorOutputSurface* surface = WebKit::Platform::current()->compositorSupport()->createOutputSurfaceForSoftware();
-        if (!surface)
-            surface = WebViewHostOutputSurface::createSoftware(adoptPtr(new WebViewHostSoftwareOutputDevice)).leakPtr();
-        return surface;
-    }
+    if (m_shell->softwareCompositingEnabled())
+        return WebKit::Platform::current()->compositorSupport()->createOutputSurfaceForSoftware();
 
     WebGraphicsContext3D* context = webkit_support::CreateGraphicsContext3D(WebGraphicsContext3D::Attributes(), webView());
-    WebCompositorOutputSurface* surface = WebKit::Platform::current()->compositorSupport()->createOutputSurfaceFor3D(context);
-    if (!surface)
-        surface = WebViewHostOutputSurface::create3d(adoptPtr(context)).leakPtr();
-    return surface;
+    return WebKit::Platform::current()->compositorSupport()->createOutputSurfaceFor3D(context);
 }
 
 void WebViewHost::didAddMessageToConsole(const WebConsoleMessage& message, const WebString& sourceName, unsigned sourceLine)

Deleted: trunk/Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.cpp (137255 => 137256)


--- trunk/Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.cpp	2012-12-11 07:33:01 UTC (rev 137255)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.cpp	2012-12-11 07:45:17 UTC (rev 137256)
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "WebViewHostOutputSurface.h"
-
-#include <public/WebCompositorSoftwareOutputDevice.h>
-#include <public/WebGraphicsContext3D.h>
-#include <wtf/Assertions.h>
-
-namespace WebKit {
-
-PassOwnPtr<WebViewHostOutputSurface> WebViewHostOutputSurface::create3d(PassOwnPtr<WebKit::WebGraphicsContext3D> context3d)
-{
-    return adoptPtr(new WebViewHostOutputSurface(context3d));
-}
-
-PassOwnPtr<WebViewHostOutputSurface> WebViewHostOutputSurface::createSoftware(PassOwnPtr<WebKit::WebCompositorSoftwareOutputDevice> softwareDevice)
-{
-    return adoptPtr(new WebViewHostOutputSurface(softwareDevice));
-}
-
-WebViewHostOutputSurface::WebViewHostOutputSurface(PassOwnPtr<WebKit::WebGraphicsContext3D> context)
-    : m_context(context)
-{
-}
-
-WebViewHostOutputSurface::WebViewHostOutputSurface(PassOwnPtr<WebKit::WebCompositorSoftwareOutputDevice> softwareDevice)
-    : m_softwareDevice(softwareDevice)
-{
-}
-
-WebViewHostOutputSurface::~WebViewHostOutputSurface()
-{
-}
-
-bool WebViewHostOutputSurface::bindToClient(WebCompositorOutputSurfaceClient*)
-{
-    if (!m_context)
-        return true;
-
-    return m_context->makeContextCurrent();
-}
-
-const WebKit::WebCompositorOutputSurface::Capabilities& WebViewHostOutputSurface::capabilities() const
-{
-    return m_capabilities;
-}
-
-WebGraphicsContext3D* WebViewHostOutputSurface::context3D() const
-{
-    return m_context.get();
-}
-
-WebCompositorSoftwareOutputDevice* WebViewHostOutputSurface::softwareDevice() const
-{
-    return m_softwareDevice.get();
-}
-
-void WebViewHostOutputSurface::sendFrameToParentCompositor(const WebCompositorFrame&)
-{
-    ASSERT_NOT_REACHED();
-}
-
-}

Deleted: trunk/Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.h (137255 => 137256)


--- trunk/Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.h	2012-12-11 07:33:01 UTC (rev 137255)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.h	2012-12-11 07:45:17 UTC (rev 137256)
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WebViewHostOutputSurface_h
-#define WebViewHostOutputSurface_h
-
-#include <public/WebCompositorOutputSurface.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-
-namespace WebKit {
-
-class WebCompositorOutputSurfaceClient;
-class WebCompositorSoftwareOutputDevice;
-class WebGraphicsContext3D;
-
-class WebViewHostOutputSurface : public WebKit::WebCompositorOutputSurface {
-public:
-    static PassOwnPtr<WebViewHostOutputSurface> create3d(PassOwnPtr<WebKit::WebGraphicsContext3D>);
-    static PassOwnPtr<WebViewHostOutputSurface> createSoftware(PassOwnPtr<WebKit::WebCompositorSoftwareOutputDevice>);
-    virtual ~WebViewHostOutputSurface();
-
-    virtual bool bindToClient(WebCompositorOutputSurfaceClient*) OVERRIDE;
-
-    virtual const WebKit::WebCompositorOutputSurface::Capabilities& capabilities() const OVERRIDE;
-    virtual WebGraphicsContext3D* context3D() const OVERRIDE;
-    virtual WebCompositorSoftwareOutputDevice* softwareDevice() const OVERRIDE;
-    virtual void sendFrameToParentCompositor(const WebCompositorFrame&) OVERRIDE;
-
-private:
-    explicit WebViewHostOutputSurface(PassOwnPtr<WebKit::WebGraphicsContext3D>);
-    explicit WebViewHostOutputSurface(PassOwnPtr<WebKit::WebCompositorSoftwareOutputDevice>);
-
-    WebKit::WebCompositorOutputSurface::Capabilities m_capabilities;
-    OwnPtr<WebKit::WebGraphicsContext3D> m_context;
-    OwnPtr<WebKit::WebCompositorSoftwareOutputDevice> m_softwareDevice;
-};
-
-}
-
-#endif // WebViewHostOutputSurface_h

Deleted: trunk/Tools/DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.cpp (137255 => 137256)


--- trunk/Tools/DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.cpp	2012-12-11 07:33:01 UTC (rev 137255)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.cpp	2012-12-11 07:45:17 UTC (rev 137256)
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "WebViewHostSoftwareOutputDevice.h"
-
-#include "SkBitmap.h"
-#include "SkDevice.h"
-#include <public/WebSize.h>
-#include <wtf/Assertions.h>
-
-namespace WebKit {
-
-WebImage* WebViewHostSoftwareOutputDevice::lock(bool forWrite)
-{
-    ASSERT(m_device);
-    m_image = m_device->accessBitmap(forWrite);
-    return &m_image;
-}
-
-void WebViewHostSoftwareOutputDevice::unlock()
-{
-    m_image.reset();
-}
-
-void WebViewHostSoftwareOutputDevice::didChangeViewportSize(WebSize size)
-{
-    if (m_device && size.width == m_device->width() && size.height == m_device->height())
-        return;
-
-    m_device = adoptPtr(new SkDevice(SkBitmap::kARGB_8888_Config, size.width, size.height, true));
-}
-
-
-}

Deleted: trunk/Tools/DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.h (137255 => 137256)


--- trunk/Tools/DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.h	2012-12-11 07:33:01 UTC (rev 137255)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.h	2012-12-11 07:45:17 UTC (rev 137256)
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WebViewHostSoftwareOutputDevice_h
-#define WebViewHostSoftwareOutputDevice_h
-
-#include <public/WebCompositorSoftwareOutputDevice.h>
-#include <public/WebImage.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-
-class SkDevice;
-
-namespace WebKit {
-
-struct WebSize;
-
-class WebViewHostSoftwareOutputDevice : public WebKit::WebCompositorSoftwareOutputDevice {
-public:
-    virtual WebImage* lock(bool forWrite) OVERRIDE;
-    virtual void unlock() OVERRIDE;
-
-    virtual void didChangeViewportSize(WebSize) OVERRIDE;
-
-private:
-    OwnPtr<SkDevice> m_device;
-    WebImage m_image;
-};
-
-}
-
-#endif // WebViewHostSoftwareOutputDevice_h
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to