[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
aroben at apple.com
aroben at apple.com
Sun Feb 20 23:57:42 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 9e3fd540e1dfb2685534ddf829939f56c1c69807
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Jan 27 06:40:14 2011 +0000
Notify layers that their animations have started when we flush the context, not when we render
r76372 separated context flushing from rendering, but this bit of code got left behind.
Reviewed by Sam Weinig.
* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
(WebCore::CACFLayerTreeHost::render): Moved code to notify the layers from here to
notifyAnimationsStarted.
(WebCore::CACFLayerTreeHost::flushPendingLayerChangesNow): Added a call to
notifyAnimationsStarted after we flush the context.
(WebCore::CACFLayerTreeHost::notifyAnimationsStarted): Added. Code came from render. Changed
to call PlatformCALayer::animationStarted rather than calling through to the client
directly.
* platform/graphics/ca/win/CACFLayerTreeHost.h: Added notifyAniamtionsStarted.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 879d00e..5f96fb9 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,5 +1,25 @@
2011-01-26 Adam Roben <aroben at apple.com>
+ Notify layers that their animations have started when we flush the context, not when we
+ render
+
+ r76372 separated context flushing from rendering, but this bit of code got left behind.
+
+ Reviewed by Sam Weinig.
+
+ * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
+ (WebCore::CACFLayerTreeHost::render): Moved code to notify the layers from here to
+ notifyAnimationsStarted.
+ (WebCore::CACFLayerTreeHost::flushPendingLayerChangesNow): Added a call to
+ notifyAnimationsStarted after we flush the context.
+ (WebCore::CACFLayerTreeHost::notifyAnimationsStarted): Added. Code came from render. Changed
+ to call PlatformCALayer::animationStarted rather than calling through to the client
+ directly.
+
+ * platform/graphics/ca/win/CACFLayerTreeHost.h: Added notifyAniamtionsStarted.
+
+2011-01-26 Adam Roben <aroben at apple.com>
+
Small cleanup in MediaPlayerPrivateFullscreenWindow
Reviewed by Sam Weinig.
diff --git a/Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.cpp b/Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.cpp
index 1d27608..09d8965 100644
--- a/Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.cpp
+++ b/Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.cpp
@@ -439,26 +439,12 @@ void CACFLayerTreeHost::render(const Vector<CGRect>& windowDirtyRects)
return;
}
- // All pending animations will have been started with the flush. Fire the animationStarted calls
- double currentTime = WTF::currentTime();
- double currentMediaTime = CACurrentMediaTime();
- double t = currentTime + wkCACFContextGetLastCommitTime(m_context) - currentMediaTime;
- ASSERT(t <= currentTime);
-
- HashSet<RefPtr<PlatformCALayer> >::iterator end = m_pendingAnimatedLayers.end();
- for (HashSet<RefPtr<PlatformCALayer> >::iterator it = m_pendingAnimatedLayers.begin(); it != end; ++it) {
- PlatformCALayerClient* owner = (*it)->owner();
- owner->platformCALayerAnimationStarted(t);
- }
-
- m_pendingAnimatedLayers.clear();
-
CGRect bounds = this->bounds();
// Give the renderer some space to use. This needs to be valid until the
// wkCACFContextFinishUpdate() call below.
char space[4096];
- if (!wkCACFContextBeginUpdate(m_context, space, sizeof(space), currentMediaTime, bounds, windowDirtyRects.data(), windowDirtyRects.size()))
+ if (!wkCACFContextBeginUpdate(m_context, space, sizeof(space), CACurrentMediaTime(), bounds, windowDirtyRects.data(), windowDirtyRects.size()))
return;
HRESULT err = S_OK;
@@ -549,9 +535,25 @@ void CACFLayerTreeHost::flushPendingLayerChangesNow()
renderSoon();
+ // All pending animations will have been started with the flush. Fire the animationStarted calls.
+ notifyAnimationsStarted();
+
m_isFlushingLayerChanges = false;
}
+void CACFLayerTreeHost::notifyAnimationsStarted()
+{
+ double currentTime = WTF::currentTime();
+ double time = currentTime + wkCACFContextGetLastCommitTime(m_context) - CACurrentMediaTime();
+ ASSERT(time <= currentTime);
+
+ HashSet<RefPtr<PlatformCALayer> >::iterator end = m_pendingAnimatedLayers.end();
+ for (HashSet<RefPtr<PlatformCALayer> >::iterator it = m_pendingAnimatedLayers.begin(); it != end; ++it)
+ (*it)->animationStarted(time);
+
+ m_pendingAnimatedLayers.clear();
+}
+
CGRect CACFLayerTreeHost::bounds() const
{
RECT clientRect;
diff --git a/Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.h b/Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.h
index fc61f39..8e82bf5 100644
--- a/Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.h
+++ b/Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.h
@@ -88,6 +88,7 @@ private:
void destroyRenderer();
void renderSoon();
void renderTimerFired(Timer<CACFLayerTreeHost>*);
+ void notifyAnimationsStarted();
CGRect bounds() const;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list