https://bugs.webkit.org/show_bug.cgi?id=109125
Patch by James Robinson <jamesr@chromium.org> on 2013-03-05
Reviewed by Adrienne Walker.
Source/Platform:
This deprecates most of the calls on WebLayerTreeViewClient since these interactions are handled
entirely on the embedder side of the interface now.
* chromium/public/WebLayerTreeView.h:
(WebLayerTreeView):
* chromium/public/WebLayerTreeViewClient.h:
(WebLayerTreeViewClient):
(WebKit::WebLayerTreeViewClient::willBeginFrame):
(WebKit::WebLayerTreeViewClient::didBeginFrame):
(WebKit::WebLayerTreeViewClient::applyScrollAndScale):
(WebKit::WebLayerTreeViewClient::layout):
(WebKit::WebLayerTreeViewClient::didRecreateOutputSurface):
(WebKit::WebLayerTreeViewClient::createInputHandler):
(WebKit::WebLayerTreeViewClient::createOutputSurface):
(WebKit::WebLayerTreeViewClient::willCommit):
(WebKit::WebLayerTreeViewClient::didCommit):
(WebKit::WebLayerTreeViewClient::didCommitAndDrawFrame):
(WebKit::WebLayerTreeViewClient::didCompleteSwapBuffers):
Source/WebKit/chromium:
This removes most of the compositing control flow logic from WebViewImpl since
it is now handled in the embedding layer (by the implementation of WebViewClient/WebWidgetClient).
* public/WebViewClient.h:
* public/WebWidget.h:
(WebKit):
(WebKit::WebWidget::animate):
(WebWidget):
(WebKit::WebWidget::didExitCompositingMode):
(WebKit::WebWidget::createInputHandler):
(WebKit::WebWidget::applyScrollAndScale):
(WebKit::WebWidget::instrumentBeginFrame):
(WebKit::WebWidget::instrumentWillBeginFrame):
(WebKit::WebWidget::instrumentDidCancelFrame):
(WebKit::WebWidget::instrumentDidBeginFrame):
(WebKit::WebWidget::instrumentWillComposite):
* src/WebHelperPluginImpl.cpp:
* src/WebHelperPluginImpl.h:
(WebHelperPluginImpl):
* src/WebPagePopupImpl.cpp:
* src/WebPagePopupImpl.h:
(WebPagePopupImpl):
* src/WebPopupMenuImpl.cpp:
* src/WebPopupMenuImpl.h:
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::instrumentWillBeginFrame):
(WebKit::WebViewImpl::instrumentDidBeginFrame):
(WebKit::WebViewImpl::instrumentDidCancelFrame):
(WebKit::WebViewImpl::instrumentWillComposite):
(WebKit):
(WebKit::WebViewImpl::updateBatteryStatus):
(WebKit::WebViewImpl::animate):
(WebKit::WebViewImpl::didExitCompositingMode):
* src/WebViewImpl.h:
* tests/WebLayerTreeViewTestCommon.h:
(MockWebLayerTreeViewClient):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144784
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-03-05 James Robinson <jamesr@chromium.org>
+
+ [chromium] Clean up WebWidget / WebLayerTreeView interactions
+ https://bugs.webkit.org/show_bug.cgi?id=109125
+
+ Reviewed by Adrienne Walker.
+
+ This deprecates most of the calls on WebLayerTreeViewClient since these interactions are handled
+ entirely on the embedder side of the interface now.
+
+ * chromium/public/WebLayerTreeView.h:
+ (WebLayerTreeView):
+ * chromium/public/WebLayerTreeViewClient.h:
+ (WebLayerTreeViewClient):
+ (WebKit::WebLayerTreeViewClient::willBeginFrame):
+ (WebKit::WebLayerTreeViewClient::didBeginFrame):
+ (WebKit::WebLayerTreeViewClient::applyScrollAndScale):
+ (WebKit::WebLayerTreeViewClient::layout):
+ (WebKit::WebLayerTreeViewClient::didRecreateOutputSurface):
+ (WebKit::WebLayerTreeViewClient::createInputHandler):
+ (WebKit::WebLayerTreeViewClient::createOutputSurface):
+ (WebKit::WebLayerTreeViewClient::willCommit):
+ (WebKit::WebLayerTreeViewClient::didCommit):
+ (WebKit::WebLayerTreeViewClient::didCommitAndDrawFrame):
+ (WebKit::WebLayerTreeViewClient::didCompleteSwapBuffers):
+
2013-03-05 Tommy Widenflycht <tommyw@google.com>
MediaStream API: Add the getStreamById method on RTCPeerConnection
// Flow control and scheduling ---------------------------------------
- // Requests an updateAnimations() call.
+ // Indicates that an animation needs to be updated.
virtual void setNeedsAnimate() = 0;
// Indicates that the view needs to be redrawn. This is typically used when the frontbuffer is damaged.
// Indicates whether a commit is pending.
virtual bool commitRequested() const = 0;
- // Triggers a compositing pass. If the compositor thread was not
- // enabled via WebCompositorSupport::initialize, the compositing pass happens
- // immediately. If it is enabled, the compositing pass will happen at a
- // later time. Before the compositing pass happens (i.e. before composite()
- // returns when the compositor thread is disabled), WebContentLayers will be
- // asked to paint their dirty region, through
- // WebContentLayerClient::paintContents.
- virtual void composite() = 0;
-
- // Immediately update animations. This should only be used when frame scheduling is handled by
- // the WebLayerTreeView user and not internally by the compositor, meaning only in single-threaded
- // mode.
- virtual void updateAnimations(double frameBeginTime) = 0;
-
// Relays the end of a fling animation.
virtual void didStopFlinging() { }
class WebLayerTreeViewClient {
public:
- // Indicates to the embedder that the compositor is about to begin a
- // frame. This is is a signal to flow control mechanisms that a frame is
- // beginning. This call will be followed by updateAnimations and then
- // layout, which should be used for actual animation or tree manipulation
- // tasks. FIXME: make pure virtual once upstream deps are satisfied.
- virtual void willBeginFrame() { }
-
- // Indicates that main thread tasks associated with frame rendering have completed.
- // Issued unconditionally, even if the context was lost in the process.
- virtual void didBeginFrame() { }
-
- // Updates animation and layout. These are called before the compositing
- // pass so that layers can be updated at the given frame time.
- virtual void updateAnimations(double monotonicFrameBeginTime) = 0;
- virtual void layout() = 0;
-
- // Applies a scroll delta to the root layer, which is bundled with a page
- // scale factor that may apply a CSS transform on the whole document (used
- // for mobile-device pinch zooming). This is triggered by events sent to the
- // compositor thread through the WebCompositor interface.
- virtual void applyScrollAndScale(const WebSize& scrollDelta, float scaleFactor) = 0;
-
- // Creates the output surface. This may be called more than once
- // if the context gets lost.
- virtual WebCompositorOutputSurface* createOutputSurface() { return 0; }
-
- // Signals a successful recreation of the output surface (e.g. after a lost
- // 3D context event).
+ // DEPRECATED - WILL BE REMOVED SOON
+ virtual void applyScrollAndScale(const WebSize& scrollDelta, float scaleFactor) { }
+ virtual void updateAnimations(double frameBeginTime) { }
virtual void didRecreateOutputSurface(bool success) { }
-
virtual WebInputHandler* createInputHandler() { return 0; }
- // Schedules a compositing pass, meaning the client should call
- // WebLayerTreeView::composite at a later time. This is only called if the
- // compositor thread is disabled; when enabled, the compositor will
- // internally schedule a compositing pass when needed.
- virtual void scheduleComposite() = 0;
-
protected:
virtual ~WebLayerTreeViewClient() { }
};
+2013-03-05 James Robinson <jamesr@chromium.org>
+
+ [chromium] Clean up WebWidget / WebLayerTreeView interactions
+ https://bugs.webkit.org/show_bug.cgi?id=109125
+
+ Reviewed by Adrienne Walker.
+
+ This removes most of the compositing control flow logic from WebViewImpl since
+ it is now handled in the embedding layer (by the implementation of WebViewClient/WebWidgetClient).
+
+ * public/WebViewClient.h:
+ * public/WebWidget.h:
+ (WebKit):
+ (WebKit::WebWidget::animate):
+ (WebWidget):
+ (WebKit::WebWidget::didExitCompositingMode):
+ (WebKit::WebWidget::createInputHandler):
+ (WebKit::WebWidget::applyScrollAndScale):
+ (WebKit::WebWidget::instrumentBeginFrame):
+ (WebKit::WebWidget::instrumentWillBeginFrame):
+ (WebKit::WebWidget::instrumentDidCancelFrame):
+ (WebKit::WebWidget::instrumentDidBeginFrame):
+ (WebKit::WebWidget::instrumentWillComposite):
+ * src/WebHelperPluginImpl.cpp:
+ * src/WebHelperPluginImpl.h:
+ (WebHelperPluginImpl):
+ * src/WebPagePopupImpl.cpp:
+ * src/WebPagePopupImpl.h:
+ (WebPagePopupImpl):
+ * src/WebPopupMenuImpl.cpp:
+ * src/WebPopupMenuImpl.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::instrumentWillBeginFrame):
+ (WebKit::WebViewImpl::instrumentDidBeginFrame):
+ (WebKit::WebViewImpl::instrumentDidCancelFrame):
+ (WebKit::WebViewImpl::instrumentWillComposite):
+ (WebKit):
+ (WebKit::WebViewImpl::updateBatteryStatus):
+ (WebKit::WebViewImpl::animate):
+ (WebKit::WebViewImpl::didExitCompositingMode):
+ * src/WebViewImpl.h:
+ * tests/WebLayerTreeViewTestCommon.h:
+ (MockWebLayerTreeViewClient):
+
2013-03-05 Alexei Filippov <alph@chromium.org>
Web Inspector: Add a renderer process memory size test.
// Create a session storage namespace object associated with this WebView.
virtual WebStorageNamespace* createSessionStorageNamespace(unsigned quota) { return 0; }
- // DEPRECATED: Creates a graphics context that renders to the client's WebView.
- virtual WebGraphicsContext3D* createGraphicsContext3D(const WebGraphicsContext3D::Attributes&) { return 0; }
-
- // Creates the output surface that renders to the client's WebView.
- virtual WebCompositorOutputSurface* createOutputSurface() { return 0; }
// Misc ----------------------------------------------------------------
namespace WebKit {
class WebInputEvent;
+class WebInputHandler;
class WebLayerTreeView;
class WebMouseEvent;
class WebString;
// Called to update imperative animation state. This should be called before
// paint, although the client can rate-limit these calls.
- virtual void animate(double ignored) { }
+ virtual void animate(double monotonicFrameBeginTime) { }
// Called to layout the WebWidget. This MUST be called before Paint,
// and it may result in calls to WebWidgetClient::didInvalidateRect.
// should be called before paint.
virtual void enterForceCompositingMode(bool enter) { }
+ // Called to notify the WebWidget that the widget has exited compositing
+ // mode and cannot reenter.
+ virtual void didExitCompositingMode() { }
+
enum PaintOptions {
// Attempt to fulfill the painting request by reading back from the
// compositor, assuming we're using a compositor to render.
// warranted before painting again).
virtual void paint(WebCanvas*, const WebRect& viewPort, PaintOptions = ReadbackFromCompositorIfAvailable) { }
- // In non-threaded compositing mode, triggers compositing of the current
- // layers onto the screen. You MUST call Layout before calling this method,
- // for the same reasons described in the paint method above
- //
- // In threaded compositing mode, indicates that the widget should update
- // itself, for example due to window damage. The redraw will begin
- // asynchronously and perform layout and animation internally. Do not call
- // animate or layout in this case.
- virtual void composite(bool finish) = 0;
-
// Returns true if we've started tracking repaint rectangles.
virtual bool isTrackingRepaints() const { return false; }
// Check whether the given point hits any registered touch event handlers.
virtual bool hasTouchEventHandlersAt(const WebPoint&) { return true; }
+ // Request that the WebWidget create an input handler for processing input
+ // events intended for this widget off of the main thread.
+ virtual WebInputHandler* createInputHandler() { return 0; }
+
+ // Applies a scroll delta to the root layer, which is bundled with a page
+ // scale factor that may apply a CSS transform on the whole document (used
+ // for mobile-device pinch zooming). This is triggered by events sent to the
+ // compositor thread through the WebInputHandler interface.
+ virtual void applyScrollAndScale(const WebSize& scrollDelta, float scaleFactor) { }
+
// Called to inform the WebWidget that mouse capture was lost.
virtual void mouseCaptureLost() { }
// process.
virtual void didCompleteSwapBuffers() { }
- // Called when a call to WebWidget::composite is required
- virtual void scheduleComposite() { }
-
// Called when a call to WebWidget::animate is required
virtual void scheduleAnimation() { }
m_page.clear();
}
-void WebHelperPluginImpl::setCompositorSurfaceReady()
-{
-}
-
-void WebHelperPluginImpl::composite(bool)
-{
-}
-
void WebHelperPluginImpl::layout()
{
PageWidgetDelegate::layout(m_page.get());
void destoryPage();
// WebWidget methods:
- virtual void setCompositorSurfaceReady() OVERRIDE;
- virtual void composite(bool) OVERRIDE;
virtual void layout() OVERRIDE;
virtual void setFocus(bool) OVERRIDE;
virtual void close() OVERRIDE;
PageWidgetDelegate::animate(m_page.get(), monotonicallyIncreasingTime());
}
-void WebPagePopupImpl::setCompositorSurfaceReady()
-{
-}
-
-void WebPagePopupImpl::composite(bool)
-{
-}
-
void WebPagePopupImpl::layout()
{
PageWidgetDelegate::layout(m_page.get());
// WebWidget functions
virtual WebSize size() OVERRIDE;
virtual void animate(double) OVERRIDE;
- virtual void setCompositorSurfaceReady() OVERRIDE;
- virtual void composite(bool) OVERRIDE;
virtual void layout() OVERRIDE;
virtual void paint(WebCanvas*, const WebRect&, PaintOptions = ReadbackFromCompositorIfAvailable) OVERRIDE;
virtual void resize(const WebSize&) OVERRIDE;
notImplemented();
}
-void WebPopupMenuImpl::setCompositorSurfaceReady()
-{
- notImplemented();
-}
-
-void WebPopupMenuImpl::composite(bool)
-{
- notImplemented();
-}
-
bool WebPopupMenuImpl::handleInputEvent(const WebInputEvent& inputEvent)
{
if (!m_widget)
virtual void layout() OVERRIDE;
virtual void paint(WebCanvas*, const WebRect&, PaintOptions = ReadbackFromCompositorIfAvailable) OVERRIDE;
virtual void themeChanged() OVERRIDE;
- virtual void setCompositorSurfaceReady() OVERRIDE;
- virtual void composite(bool finish) OVERRIDE;
virtual bool handleInputEvent(const WebInputEvent&) OVERRIDE;
virtual void mouseCaptureLost() OVERRIDE;
virtual void setFocus(bool enable) OVERRIDE;
void WebViewImpl::animate(double monotonicFrameBeginTime)
{
- updateAnimations(monotonicFrameBeginTime);
-}
-
-void WebViewImpl::willBeginFrame()
-{
- m_client->willBeginCompositorFrame();
-}
+ TRACE_EVENT0("webkit", "WebViewImpl::animate");
-void WebViewImpl::didBeginFrame()
-{
- if (m_devToolsAgent)
- m_devToolsAgent->didComposite();
-}
-
-void WebViewImpl::updateAnimations(double monotonicFrameBeginTime)
-{
if (!monotonicFrameBeginTime)
monotonicFrameBeginTime = monotonicallyIncreasingTime();
-#if ENABLE(REQUEST_ANIMATION_FRAME)
- TRACE_EVENT0("webkit", "WebViewImpl::updateAnimations");
-
// Create synthetic wheel events as necessary for fling.
if (m_gestureAnimation) {
if (m_gestureAnimation->animate(monotonicFrameBeginTime))
if (!m_page)
return;
+ PageWidgetDelegate::animate(m_page.get(), monotonicFrameBeginTime);
+
if (m_continuousPaintingEnabled) {
ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer, m_pageOverlays.get());
m_client->scheduleAnimation();
}
+}
- PageWidgetDelegate::animate(m_page.get(), monotonicFrameBeginTime);
-#endif
+void WebViewImpl::updateAnimations(double monotonicFrameBeginTime)
+{
+ animate(monotonicFrameBeginTime);
}
void WebViewImpl::layout()
view->invalidateRect(damagedRect);
}
-void WebViewImpl::composite(bool)
-{
-#if USE(ACCELERATED_COMPOSITING)
- if (Platform::current()->compositorSupport()->isThreadingEnabled())
- m_layerTreeView->setNeedsRedraw();
- else {
- ASSERT(isAcceleratedCompositingActive());
- if (!page())
- return;
-
- m_layerTreeView->composite();
- }
-#endif
-}
-
void WebViewImpl::setNeedsRedraw()
{
#if USE(ACCELERATED_COMPOSITING)
#endif
-WebCompositorOutputSurface* WebViewImpl::createOutputSurface()
-{
- return m_client->createOutputSurface();
-}
-
WebInputHandler* WebViewImpl::createInputHandler()
{
WebCompositorInputHandlerImpl* handler = new WebCompositorInputHandlerImpl();
void WebViewImpl::didRecreateOutputSurface(bool success)
{
- // Switch back to software rendering mode, if necessary
- if (!success) {
- ASSERT(m_isAcceleratedCompositingActive);
- setIsAcceleratedCompositingActive(false);
- m_compositorCreationFailed = true;
- m_client->didInvalidateRect(IntRect(0, 0, m_size.width, m_size.height));
+ if (!success)
+ didExitCompositingMode();
+}
- // Force a style recalc to remove all the composited layers.
- m_page->mainFrame()->document()->scheduleForcedStyleRecalc();
- return;
- }
+void WebViewImpl::didExitCompositingMode()
+{
+ ASSERT(m_isAcceleratedCompositingActive);
+ setIsAcceleratedCompositingActive(false);
+ m_compositorCreationFailed = true;
+ m_client->didInvalidateRect(IntRect(0, 0, m_size.width, m_size.height));
+
+ // Force a style recalc to remove all the composited layers.
+ m_page->mainFrame()->document()->scheduleForcedStyleRecalc();
if (m_pageOverlays)
m_pageOverlays->update();
}
-void WebViewImpl::scheduleComposite()
-{
- ASSERT(!Platform::current()->compositorSupport()->isThreadingEnabled());
- m_client->scheduleComposite();
-}
-
void WebViewImpl::updateLayerTreeViewport()
{
if (!page() || !m_nonCompositedContentHost || !m_layerTreeView)
virtual void willExitFullScreen();
virtual void didExitFullScreen();
virtual void animate(double);
- virtual void layout(); // Also implements WebLayerTreeViewClient::layout()
+ virtual void layout();
virtual void enterForceCompositingMode(bool enable) OVERRIDE;
virtual void paint(WebCanvas*, const WebRect&, PaintOptions = ReadbackFromCompositorIfAvailable);
virtual bool isTrackingRepaints() const OVERRIDE;
virtual void themeChanged();
- virtual void composite(bool finish);
virtual void setNeedsRedraw();
virtual bool handleInputEvent(const WebInputEvent&);
virtual bool hasTouchEventHandlersAt(const WebPoint&);
+ virtual WebInputHandler* createInputHandler() OVERRIDE;
+ virtual void applyScrollAndScale(const WebSize&, float);
virtual void mouseCaptureLost();
virtual void setFocus(bool enable);
virtual bool setComposition(
virtual void didNotAcquirePointerLock();
virtual void didLosePointerLock();
virtual void didChangeWindowResizerRect();
+ virtual void didExitCompositingMode();
// WebView methods:
virtual void initializeMainFrame(WebFrameClient*);
virtual void setContinuousPaintingEnabled(bool);
// WebLayerTreeViewClient
- virtual void willBeginFrame();
- virtual void didBeginFrame();
virtual void updateAnimations(double monotonicFrameBeginTime);
- virtual void applyScrollAndScale(const WebSize&, float);
- virtual WebCompositorOutputSurface* createOutputSurface() OVERRIDE;
- virtual void didRecreateOutputSurface(bool success) OVERRIDE;
- virtual WebInputHandler* createInputHandler() OVERRIDE;
- virtual void scheduleComposite();
+ virtual void didRecreateOutputSurface(bool success);
// WebViewImpl
#include "RotateTransformOperation.h"
#include "ScrollableArea.h"
#include "TranslateTransformOperation.h"
-#include "WebLayerTreeViewTestCommon.h"
#include <gtest/gtest.h>
#include <public/Platform.h>
+#include <public/WebCompositorSupport.h>
#include <public/WebFloatAnimationCurve.h>
#include <public/WebGraphicsContext3D.h>
#include <public/WebLayerTreeView.h>
OwnPtr<GraphicsLayerChromium> m_graphicsLayer;
private:
- MockWebLayerTreeViewClient m_layerTreeViewClient;
OwnPtr<WebLayerTreeView> m_layerTreeView;
MockGraphicsLayerClient m_client;
};
#include "ScrollingCoordinator.h"
-#include "CompositorFakeWebGraphicsContext3D.h"
#include "FrameTestHelpers.h"
#include "GraphicsLayerChromium.h"
#include "RenderLayerBacking.h"
#include "WebViewImpl.h"
#include <gtest/gtest.h>
#include <public/Platform.h>
-#include <public/WebCompositorSupport.h>
#include <public/WebLayer.h>
+#include <public/WebLayerTreeView.h>
#include <public/WebUnitTestSupport.h>
using namespace WebCore;
class FakeWebViewClient : public WebViewClient {
public:
- virtual WebCompositorOutputSurface* createOutputSurface() OVERRIDE
- {
- return Platform::current()->compositorSupport()->createOutputSurfaceFor3D(CompositorFakeWebGraphicsContext3D::create(WebGraphicsContext3D::Attributes()).leakPtr());
- }
-
virtual void initializeLayerTreeView(WebLayerTreeViewClient* client, const WebLayer& rootLayer, const WebLayerTreeView::Settings& settings)
{
m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLayerTreeViewForTesting(WebUnitTestSupport::TestViewTypeUnitTest));
public:
ScrollingCoordinatorChromiumTest()
: m_baseURL("http://www.test.com/")
+ , m_compositorInitializer(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));
{
Platform::current()->unitTestSupport()->unregisterAllMockedURLs();
m_webViewImpl->close();
-
- Platform::current()->compositorSupport()->shutdown();
}
void navigateTo(const std::string& url)
MockWebFrameClient m_mockWebFrameClient;
FakeWebViewClient m_mockWebViewClient;
WebViewImpl* m_webViewImpl;
+ WebKitTests::WebCompositorInitializer m_compositorInitializer;
};
TEST_F(ScrollingCoordinatorChromiumTest, fastScrollingByDefault)
+++ /dev/null
-/*
- * 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 INC. 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 INC. 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 WebLayerTreeViewTestCommon_h
-#define WebLayerTreeViewTestCommon_h
-
-#include "CompositorFakeWebGraphicsContext3D.h"
-#include <gmock/gmock.h>
-#include <public/Platform.h>
-#include <public/WebCompositorSupport.h>
-#include <public/WebLayerTreeViewClient.h>
-
-namespace WebKit {
-
-class MockWebLayerTreeViewClient : public WebLayerTreeViewClient {
-public:
- MOCK_METHOD0(scheduleComposite, void());
- virtual void updateAnimations(double frameBeginTime) OVERRIDE { }
- MOCK_METHOD0(willBeginFrame, void());
- MOCK_METHOD0(didBeginFrame, void());
- virtual void layout() OVERRIDE { }
- virtual void applyScrollAndScale(const WebSize& scrollDelta, float scaleFactor) OVERRIDE { }
-
- virtual WebCompositorOutputSurface* createOutputSurface() OVERRIDE
- {
- return Platform::current()->compositorSupport()->createOutputSurfaceFor3D(CompositorFakeWebGraphicsContext3D::create(WebGraphicsContext3D::Attributes()).leakPtr());
- }
- virtual void didRecreateOutputSurface(bool) OVERRIDE { }
-};
-
-}
-
-#endif // WebLayerTreeViewTestCommon_h
// Pending task list, Note taht the method is referred from WebMethodTask class.
WebTestRunner::WebTaskList* taskList() { return &m_taskList; }
+ // Exposed for WebTestProxy.
+ void scheduleComposite() { }
+
private:
class HostMethodTask : public WebTestRunner::WebMethodTask<WebViewHost> {