[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):


git-svn-id: https://svn.webkit.org/repository/webkit/trunk/Source/Platform/chromium/public@136779 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCompositorOutputSurface.h b/WebCompositorOutputSurface.h
index ed0138a..160783b 100644
--- a/WebCompositorOutputSurface.h
+++ b/WebCompositorOutputSurface.h
@@ -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
 
 }
 
diff --git a/WebCompositorOutputSurfaceClient.h b/WebCompositorOutputSurfaceClient.h
index fc78c58..e2f632d 100644
--- a/WebCompositorOutputSurfaceClient.h
+++ b/WebCompositorOutputSurfaceClient.h
@@ -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
 
 }
 
diff --git a/WebCompositorSoftwareOutputDevice.h b/WebCompositorSoftwareOutputDevice.h
index 4102d41..e5c7bb3 100644
--- a/WebCompositorSoftwareOutputDevice.h
+++ b/WebCompositorSoftwareOutputDevice.h
@@ -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
 
 }
 
diff --git a/WebCompositorSupport.h b/WebCompositorSupport.h
index 2fee758..1a9d355 100644
--- a/WebCompositorSupport.h
+++ b/WebCompositorSupport.h
@@ -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,6 +72,11 @@
     // 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 -------------------------------------------------------