Diff
Modified: trunk/Source/Platform/ChangeLog (112359 => 112360)
--- trunk/Source/Platform/ChangeLog 2012-03-28 03:05:31 UTC (rev 112359)
+++ trunk/Source/Platform/ChangeLog 2012-03-28 03:15:57 UTC (rev 112360)
@@ -1,3 +1,13 @@
+2012-03-27 Nat Duca <[email protected]>
+
+ [chromium] Route monotonic clock up from compositor
+ https://bugs.webkit.org/show_bug.cgi?id=82154
+
+ Reviewed by James Robinson.
+
+ * chromium/public/WebLayerTreeViewClient.h:
+ (WebLayerTreeViewClient):
+
2012-03-26 Nat Duca <[email protected]>
[chromium] Add isInputThrottled/didBecomeReadyForAdditionalInput to WebWidget
Modified: trunk/Source/Platform/chromium/public/WebLayerTreeViewClient.h (112359 => 112360)
--- trunk/Source/Platform/chromium/public/WebLayerTreeViewClient.h 2012-03-28 03:05:31 UTC (rev 112359)
+++ trunk/Source/Platform/chromium/public/WebLayerTreeViewClient.h 2012-03-28 03:15:57 UTC (rev 112360)
@@ -42,7 +42,7 @@
// 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 frameBeginTime) = 0;
+ virtual void updateAnimations(double monotonicFrameBeginTime) = 0;
virtual void layout() = 0;
// Applies a scroll delta to the root layer, which is bundled with a page
Modified: trunk/Source/WebCore/ChangeLog (112359 => 112360)
--- trunk/Source/WebCore/ChangeLog 2012-03-28 03:05:31 UTC (rev 112359)
+++ trunk/Source/WebCore/ChangeLog 2012-03-28 03:15:57 UTC (rev 112360)
@@ -1,3 +1,21 @@
+2012-03-27 Nat Duca <[email protected]>
+
+ [chromium] Route monotonic clock up from compositor
+ https://bugs.webkit.org/show_bug.cgi?id=82154
+
+ Reviewed by James Robinson.
+
+ * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
+ (WebCore::CCLayerTreeHost::updateAnimations):
+ * platform/graphics/chromium/cc/CCLayerTreeHost.h:
+ (CCLayerTreeHost):
+ * platform/graphics/chromium/cc/CCThreadProxy.cpp:
+ (WebCore::CCThreadProxy::scheduledActionBeginFrame):
+ (WebCore::CCThreadProxy::beginFrame):
+ * platform/graphics/chromium/cc/CCThreadProxy.h:
+ (WebCore::CCThreadProxy::BeginFrameAndCommitState::BeginFrameAndCommitState):
+ (BeginFrameAndCommitState):
+
2012-03-27 Robin Cao <[email protected]>
[BlackBerry] Upstream LayerAnimation.{cpp, h}
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp (112359 => 112360)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp 2012-03-28 03:05:31 UTC (rev 112359)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp 2012-03-28 03:15:57 UTC (rev 112360)
@@ -181,11 +181,11 @@
m_contentsTextureManager->evictAndDeleteAllTextures(allocator);
}
-void CCLayerTreeHost::updateAnimations(double wallClockTime)
+void CCLayerTreeHost::updateAnimations(double monotonicFrameBeginTime)
{
m_animating = true;
- m_client->updateAnimations(wallClockTime);
- animateLayers(monotonicallyIncreasingTime());
+ m_client->updateAnimations(monotonicFrameBeginTime);
+ animateLayers(monotonicFrameBeginTime);
m_animating = false;
}
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h (112359 => 112360)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h 2012-03-28 03:05:31 UTC (rev 112359)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h 2012-03-28 03:15:57 UTC (rev 112360)
@@ -135,7 +135,7 @@
// CCLayerTreeHost interface to CCProxy.
void willBeginFrame() { m_client->willBeginFrame(); }
- void updateAnimations(double wallClockTime);
+ void updateAnimations(double monotonicFrameBeginTime);
void layout();
void beginCommitOnImplThread(CCLayerTreeHostImpl*);
void finishCommitOnImplThread(CCLayerTreeHostImpl*);
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp (112359 => 112360)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp 2012-03-28 03:05:31 UTC (rev 112359)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp 2012-03-28 03:15:57 UTC (rev 112360)
@@ -411,7 +411,7 @@
TRACE_EVENT0("cc", "CCThreadProxy::scheduledActionBeginFrame");
ASSERT(!m_pendingBeginFrameRequest);
m_pendingBeginFrameRequest = adoptPtr(new BeginFrameAndCommitState());
- m_pendingBeginFrameRequest->frameBeginTime = currentTime();
+ m_pendingBeginFrameRequest->monotonicFrameBeginTime = monotonicallyIncreasingTime();
m_pendingBeginFrameRequest->scrollInfo = m_layerTreeHostImpl->processScrollDeltas();
m_mainThreadProxy->postTask(createCCThreadTask(this, &CCThreadProxy::beginFrame));
@@ -458,7 +458,7 @@
m_layerTreeHost->willBeginFrame();
// FIXME: recreate the context if it was requested by the impl thread.
- m_layerTreeHost->updateAnimations(request->frameBeginTime);
+ m_layerTreeHost->updateAnimations(request->monotonicFrameBeginTime);
m_layerTreeHost->layout();
// Clear the commit flag after updating animations and layout here --- objects that only
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.h (112359 => 112360)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.h 2012-03-28 03:05:31 UTC (rev 112359)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.h 2012-03-28 03:15:57 UTC (rev 112360)
@@ -94,8 +94,8 @@
// Set on impl thread, read on main thread.
struct BeginFrameAndCommitState {
- BeginFrameAndCommitState() : frameBeginTime() { }
- double frameBeginTime;
+ BeginFrameAndCommitState() : monotonicFrameBeginTime() { }
+ double monotonicFrameBeginTime;
OwnPtr<CCScrollAndScaleSet> scrollInfo;
};
OwnPtr<BeginFrameAndCommitState> m_pendingBeginFrameRequest;
Modified: trunk/Source/WebKit/chromium/ChangeLog (112359 => 112360)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-03-28 03:05:31 UTC (rev 112359)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-03-28 03:15:57 UTC (rev 112360)
@@ -1,3 +1,24 @@
+2012-03-27 Nat Duca <[email protected]>
+
+ [chromium] Route monotonic clock up from compositor
+ https://bugs.webkit.org/show_bug.cgi?id=82154
+
+ Reviewed by James Robinson.
+
+ * public/WebWidget.h:
+ (WebKit::WebWidget::animate):
+ * src/WebLayerTreeViewImpl.cpp:
+ (WebKit::WebLayerTreeViewImpl::updateAnimations):
+ * src/WebLayerTreeViewImpl.h:
+ (WebLayerTreeViewImpl):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::animate):
+ (WebKit::WebViewImpl::updateAnimations):
+ * src/WebViewImpl.h:
+ (WebViewImpl):
+ * tests/FakeCCLayerTreeHostClient.h:
+ (WebCore::FakeCCLayerTreeHostClient::updateAnimations):
+
2012-03-27 James Robinson <[email protected]>
webkit_unit_tests crashing on chromium lion in CCLayerTreeHostTestCompositeAndReadbackWhileInvisible
Modified: trunk/Source/WebKit/chromium/public/WebWidget.h (112359 => 112360)
--- trunk/Source/WebKit/chromium/public/WebWidget.h 2012-03-28 03:05:31 UTC (rev 112359)
+++ trunk/Source/WebKit/chromium/public/WebWidget.h 2012-03-28 03:15:57 UTC (rev 112360)
@@ -79,10 +79,10 @@
virtual void didExitFullScreen() { }
// Called to update imperative animation state. This should be called before
- // paint, although the client can rate-limit these calls. When
- // frameBeginTime is 0.0, the WebWidget will determine the frame begin time
- // itself.
- virtual void animate(double frameBeginTime) { }
+ // paint, although the client can rate-limit these calls.
+ //
+ // FIXME: remove this function entirely when inversion patches land.
+ virtual void animate(double ignored) { }
// Called to layout the WebWidget. This MUST be called before Paint,
// and it may result in calls to WebWidgetClient::didInvalidateRect.
Modified: trunk/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp (112359 => 112360)
--- trunk/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp 2012-03-28 03:05:31 UTC (rev 112359)
+++ trunk/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp 2012-03-28 03:15:57 UTC (rev 112360)
@@ -66,10 +66,10 @@
m_client->willBeginFrame();
}
-void WebLayerTreeViewImpl::updateAnimations(double frameBeginTime)
+void WebLayerTreeViewImpl::updateAnimations(double monotonicFrameBeginTime)
{
if (m_client)
- m_client->updateAnimations(frameBeginTime);
+ m_client->updateAnimations(monotonicFrameBeginTime);
}
void WebLayerTreeViewImpl::layout()
Modified: trunk/Source/WebKit/chromium/src/WebLayerTreeViewImpl.h (112359 => 112360)
--- trunk/Source/WebKit/chromium/src/WebLayerTreeViewImpl.h 2012-03-28 03:05:31 UTC (rev 112359)
+++ trunk/Source/WebKit/chromium/src/WebLayerTreeViewImpl.h 2012-03-28 03:15:57 UTC (rev 112360)
@@ -42,7 +42,7 @@
WebLayerTreeViewImpl(WebLayerTreeViewClient*, const WebLayerTreeView::Settings&);
virtual ~WebLayerTreeViewImpl();
virtual void willBeginFrame();
- virtual void updateAnimations(double frameBeginTime);
+ virtual void updateAnimations(double monotonicFrameBeginTime);
virtual void layout();
virtual void applyScrollAndScale(const WebCore::IntSize& scrollDelta, float pageScale);
virtual PassRefPtr<WebCore::GraphicsContext3D> createContext();
Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (112359 => 112360)
--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2012-03-28 03:05:31 UTC (rev 112359)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2012-03-28 03:15:57 UTC (rev 112360)
@@ -1330,22 +1330,19 @@
InspectorInstrumentation::didCancelFrame(m_page.get());
}
-void WebViewImpl::animate(double frameBeginTime)
+void WebViewImpl::animate(double)
{
#if ENABLE(REQUEST_ANIMATION_FRAME)
- // FIXME: remove this zero-check once render_widget has been modified to
- // pass in a frameBeginTime.
- if (!frameBeginTime)
- frameBeginTime = currentTime();
+ double monotonicFrameBeginTime = monotonicallyIncreasingTime();
#if USE(ACCELERATED_COMPOSITING)
// In composited mode, we always go through the compositor so it can apply
// appropriate flow-control mechanisms.
if (isAcceleratedCompositingActive())
- m_layerTreeView.updateAnimations(frameBeginTime);
+ m_layerTreeView.updateAnimations(monotonicFrameBeginTime);
else
#endif
- updateAnimations(frameBeginTime);
+ updateAnimations(monotonicFrameBeginTime);
#endif
}
@@ -1354,7 +1351,7 @@
m_client->willBeginCompositorFrame();
}
-void WebViewImpl::updateAnimations(double frameBeginTime)
+void WebViewImpl::updateAnimations(double monotonicFrameBeginTime)
{
#if ENABLE(REQUEST_ANIMATION_FRAME)
TRACE_EVENT("WebViewImpl::updateAnimations", this, 0);
@@ -1368,13 +1365,14 @@
// Create synthetic wheel events as necessary for fling.
if (m_gestureAnimation) {
- if (m_gestureAnimation->animate(frameBeginTime))
+ if (m_gestureAnimation->animate(monotonicFrameBeginTime))
scheduleAnimation();
else
m_gestureAnimation.clear();
}
- view->serviceScriptedAnimations(convertSecondsToDOMTimeStamp(frameBeginTime));
+ double timeShift = currentTime() - monotonicallyIncreasingTime();
+ view->serviceScriptedAnimations(convertSecondsToDOMTimeStamp(monotonicFrameBeginTime + timeShift));
#endif
}
Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.h (112359 => 112360)
--- trunk/Source/WebKit/chromium/src/WebViewImpl.h 2012-03-28 03:05:31 UTC (rev 112359)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.h 2012-03-28 03:15:57 UTC (rev 112360)
@@ -116,7 +116,7 @@
virtual void didEnterFullScreen();
virtual void willExitFullScreen();
virtual void didExitFullScreen();
- virtual void animate(double frameBeginTime);
+ virtual void animate(double);
virtual void layout(); // Also implements CCLayerTreeHostClient::layout()
virtual void paint(WebCanvas*, const WebRect&);
virtual void themeChanged();
@@ -256,7 +256,7 @@
// WebLayerTreeViewClient
virtual void willBeginFrame();
- virtual void updateAnimations(double frameBeginTime);
+ virtual void updateAnimations(double monotonicFrameBeginTime);
virtual void applyScrollAndScale(const WebSize&, float);
virtual WebGraphicsContext3D* createContext3D();
virtual void didRebindGraphicsContext(bool);
Modified: trunk/Source/WebKit/chromium/tests/FakeCCLayerTreeHostClient.h (112359 => 112360)
--- trunk/Source/WebKit/chromium/tests/FakeCCLayerTreeHostClient.h 2012-03-28 03:05:31 UTC (rev 112359)
+++ trunk/Source/WebKit/chromium/tests/FakeCCLayerTreeHostClient.h 2012-03-28 03:15:57 UTC (rev 112360)
@@ -35,7 +35,7 @@
class FakeCCLayerTreeHostClient : public CCLayerTreeHostClient {
public:
virtual void willBeginFrame() { }
- virtual void updateAnimations(double frameBeginTime) { }
+ virtual void updateAnimations(double monotonicFrameBeginTime) { }
virtual void layout() { }
virtual void applyScrollAndScale(const IntSize& scrollDelta, float pageScale) { }
virtual PassRefPtr<GraphicsContext3D> createContext()