- Revision
- 136779
- Author
- dan...@chromium.org
- Date
- 2012-12-05 16:40:25 -0800 (Wed, 05 Dec 2012)
Log Message
[chromium] Make WebCompositorOutputSurface an empty class when USE_CC_OUTPUT_SURFACE is defined.
https://bugs.webkit.org/show_bug.cgi?id=103967
Reviewed by James Robinson.
Source/Platform:
When the USE_CC_OUTPUT_SURFACE flag is set:
- Make the WebCompositorOutputSurface class empty.
- Don't define the OutputSurfaceClient.
- Don't define the SoftwareOutputDevice.
WebCompositorSupport has methods to create a WebCompositorOutputSurface. They
will return NULL until the chromium side lands, and then they will be used
in place of the existing WebViewHost methods.
* chromium/public/WebCompositorOutputSurface.h:
(WebKit):
* chromium/public/WebCompositorOutputSurfaceClient.h:
(WebKit):
* chromium/public/WebCompositorSoftwareOutputDevice.h:
(WebKit):
* chromium/public/WebCompositorSupport.h:
(WebKit):
(WebCompositorSupport):
(WebKit::WebCompositorSupport::createOutputSurfaceFor3D):
(WebKit::WebCompositorSupport::createOutputSurfaceForSoftware):
Tools:
Use the WebCompositorSupport methods to create an OutputSurface. If they
fail, then fall back to the WebViewHost methods.
Once the chromium side lands, the WebCompositorSupport methods will stop
failing, and will replace the WebViewHost ones.
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::createOutputSurface):
Modified Paths
Diff
Modified: trunk/Source/Platform/ChangeLog (136778 => 136779)
--- trunk/Source/Platform/ChangeLog 2012-12-06 00:33:51 UTC (rev 136778)
+++ trunk/Source/Platform/ChangeLog 2012-12-06 00:40:25 UTC (rev 136779)
@@ -1,3 +1,31 @@
+2012-12-05 Dana Jansens <dan...@chromium.org>
+
+ [chromium] Make WebCompositorOutputSurface an empty class when USE_CC_OUTPUT_SURFACE is defined.
+ https://bugs.webkit.org/show_bug.cgi?id=103967
+
+ Reviewed by James Robinson.
+
+ When the USE_CC_OUTPUT_SURFACE flag is set:
+ - Make the WebCompositorOutputSurface class empty.
+ - Don't define the OutputSurfaceClient.
+ - Don't define the SoftwareOutputDevice.
+
+ WebCompositorSupport has methods to create a WebCompositorOutputSurface. They
+ will return NULL until the chromium side lands, and then they will be used
+ in place of the existing WebViewHost methods.
+
+ * chromium/public/WebCompositorOutputSurface.h:
+ (WebKit):
+ * chromium/public/WebCompositorOutputSurfaceClient.h:
+ (WebKit):
+ * chromium/public/WebCompositorSoftwareOutputDevice.h:
+ (WebKit):
+ * chromium/public/WebCompositorSupport.h:
+ (WebKit):
+ (WebCompositorSupport):
+ (WebKit::WebCompositorSupport::createOutputSurfaceFor3D):
+ (WebKit::WebCompositorSupport::createOutputSurfaceForSoftware):
+
2012-12-05 Eberhard Graether <egraet...@google.com>
[chromium] Remove WebLayerTreeView API to set font atlas
Modified: trunk/Source/Platform/chromium/public/WebCompositorOutputSurface.h (136778 => 136779)
--- trunk/Source/Platform/chromium/public/WebCompositorOutputSurface.h 2012-12-06 00:33:51 UTC (rev 136778)
+++ trunk/Source/Platform/chromium/public/WebCompositorOutputSurface.h 2012-12-06 00:40:25 UTC (rev 136779)
@@ -33,6 +33,9 @@
class WebCompositorSoftwareOutputDevice;
class WebCompositorOutputSurfaceClient;
+#ifdef USE_CC_OUTPUT_SURFACE
+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.
@@ -69,6 +72,7 @@
// when capabilities().hasParentCompositor.
virtual void sendFrameToParentCompositor(const WebCompositorFrame&) = 0;
};
+#endif // USE_CC_COMPOSITOR_SURFACE
}
Modified: trunk/Source/Platform/chromium/public/WebCompositorOutputSurfaceClient.h (136778 => 136779)
--- trunk/Source/Platform/chromium/public/WebCompositorOutputSurfaceClient.h 2012-12-06 00:33:51 UTC (rev 136778)
+++ trunk/Source/Platform/chromium/public/WebCompositorOutputSurfaceClient.h 2012-12-06 00:40:25 UTC (rev 136779)
@@ -30,6 +30,7 @@
struct WebCompositorFrameAck;
+#ifndef USE_CC_OUTPUT_SURFACE
class WebCompositorOutputSurfaceClient {
public:
virtual void onVSyncParametersChanged(double monotonicTimebase, double intervalInSeconds) = 0;
@@ -38,6 +39,7 @@
protected:
~WebCompositorOutputSurfaceClient() { }
};
+#endif
}
Modified: trunk/Source/Platform/chromium/public/WebCompositorSoftwareOutputDevice.h (136778 => 136779)
--- trunk/Source/Platform/chromium/public/WebCompositorSoftwareOutputDevice.h 2012-12-06 00:33:51 UTC (rev 136778)
+++ trunk/Source/Platform/chromium/public/WebCompositorSoftwareOutputDevice.h 2012-12-06 00:40:25 UTC (rev 136779)
@@ -28,6 +28,7 @@
namespace WebKit {
+#ifndef USE_CC_SOFTWARE_OUTPUT_DEVICE
class WebImage;
struct WebSize;
@@ -46,6 +47,7 @@
virtual void didChangeViewportSize(WebSize) = 0;
};
+#endif // USE_CC_SOFTWARE_OUTPUT_DEVICE
}
Modified: trunk/Source/Platform/chromium/public/WebCompositorSupport.h (136778 => 136779)
--- trunk/Source/Platform/chromium/public/WebCompositorSupport.h 2012-12-06 00:33:51 UTC (rev 136778)
+++ trunk/Source/Platform/chromium/public/WebCompositorSupport.h 2012-12-06 00:40:25 UTC (rev 136779)
@@ -34,12 +34,14 @@
namespace WebKit {
class WebAnimationCurve;
+class WebCompositorOutputSurface;
class WebContentLayer;
class WebContentLayerClient;
class WebDelegatedRendererLayer;
class WebExternalTextureLayer;
class WebExternalTextureLayerClient;
class WebFloatAnimationCurve;
+class WebGraphicsContext3D;
class WebIOSurfaceLayer;
class WebImageLayer;
class WebLayer;
@@ -70,7 +72,12 @@
// May return 0 if initialization fails.
virtual WebLayerTreeView* createLayerTreeView(WebLayerTreeViewClient*, const WebLayer& root, const WebLayerTreeView::Settings&) { return 0; }
+ // Creates an output surface for the compositor backed by a 3d context.
+ virtual WebCompositorOutputSurface* createOutputSurfaceFor3D(WebKit::WebGraphicsContext3D*) { return 0; }
+ // Creates an output surface for the compositor backed by a software device.
+ virtual WebCompositorOutputSurface* createOutputSurfaceForSoftware() { return 0; }
+
// Layers -------------------------------------------------------
virtual WebLayer* createLayer() { return 0; }
Modified: trunk/Tools/ChangeLog (136778 => 136779)
--- trunk/Tools/ChangeLog 2012-12-06 00:33:51 UTC (rev 136778)
+++ trunk/Tools/ChangeLog 2012-12-06 00:40:25 UTC (rev 136779)
@@ -1,3 +1,19 @@
+2012-12-05 Dana Jansens <dan...@chromium.org>
+
+ [chromium] Make WebCompositorOutputSurface an empty class when USE_CC_OUTPUT_SURFACE is defined.
+ https://bugs.webkit.org/show_bug.cgi?id=103967
+
+ Reviewed by James Robinson.
+
+ Use the WebCompositorSupport methods to create an OutputSurface. If they
+ fail, then fall back to the WebViewHost methods.
+
+ Once the chromium side lands, the WebCompositorSupport methods will stop
+ failing, and will replace the WebViewHost ones.
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::createOutputSurface):
+
2012-12-05 Dirk Pranke <dpra...@chromium.org>
nrwt: split all of the buildbot-specific output into its own file
Modified: trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp (136778 => 136779)
--- trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp 2012-12-06 00:33:51 UTC (rev 136778)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp 2012-12-06 00:40:25 UTC (rev 136779)
@@ -75,6 +75,7 @@
#include "webkit/support/webkit_support.h"
#include <public/WebCString.h>
#include <public/WebCompositorOutputSurface.h>
+#include <public/WebCompositorSupport.h>
#include <public/WebDragData.h>
#include <public/WebRect.h>
#include <public/WebSize.h>
@@ -287,9 +288,18 @@
if (!webView())
return 0;
- if (m_shell->softwareCompositingEnabled())
- return WebViewHostOutputSurface::createSoftware(adoptPtr(new WebViewHostSoftwareOutputDevice)).leakPtr();
- return WebViewHostOutputSurface::create3d(adoptPtr(webkit_support::CreateGraphicsContext3D(WebGraphicsContext3D::Attributes(), webView()))).leakPtr();
+ if (m_shell->softwareCompositingEnabled()) {
+ WebCompositorOutputSurface* surface = WebKit::Platform::current()->compositorSupport()->createOutputSurfaceForSoftware();
+ if (!surface)
+ surface = WebViewHostOutputSurface::createSoftware(adoptPtr(new WebViewHostSoftwareOutputDevice)).leakPtr();
+ return surface;
+ }
+
+ 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;
}
void WebViewHost::didAddMessageToConsole(const WebConsoleMessage& message, const WebString& sourceName, unsigned sourceLine)