Bug 106594

Summary: [chromium] Register newly-created layers for animation
Product: WebKit Reporter: Ali Juma <ajuma>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dglazkov, fishd, jaffathecake, jamesr, tkent+wkapi, vollick, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch for landing none

Ali Juma
Reported 2013-01-10 12:28:24 PST
[chromium] Register newly-created layers for animation
Attachments
Patch (6.27 KB, patch)
2013-01-10 12:33 PST, Ali Juma
no flags
Patch (5.67 KB, patch)
2013-02-20 13:17 PST, Ali Juma
no flags
Patch (8.24 KB, patch)
2013-02-22 09:01 PST, Ali Juma
no flags
Patch for landing (13.03 KB, patch)
2013-02-22 11:58 PST, Ali Juma
no flags
Ali Juma
Comment 1 2013-01-10 12:33:09 PST
Ali Juma
Comment 2 2013-01-10 12:36:00 PST
This is needed for enabling accelerated animations for orphaned layers. The overall plan for this can be found at https://chromiumcodereview.appspot.com/11783037 This requires Bug 103635 and https://chromiumcodereview.appspot.com/11783101 to land first.
James Robinson
Comment 3 2013-01-15 19:59:47 PST
Comment on attachment 182191 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=182191&action=review > Source/Platform/chromium/public/WebLayerTreeView.h:154 > - virtual void updateAnimations(double frameBeginTime) = 0; > + virtual void updateAnimations(double monotonicFrameBeginTime, double wallClockFrameBegin) = 0; this is going to busterate the build unless a chromium-side patch implementing both changes has landed in chromium and rolled in. please put the chromium rev# here on this bug when you do that > Source/WebKit/chromium/src/ChromeClientImpl.cpp:134 > + WebKit::ChromeClientImpl* m_chromeClient; // weak pointer what makes sure this pointer won't outlive the object it points to? saying it's a weak pointer doesn't add anything (that's clear from the type) - what would be useful in a comment would be describing the lifecycle that makes it a *safe* weak pointer > Source/WebKit/chromium/src/ChromeClientImpl.cpp:174 > + , m_graphicsLayerFactory(adoptPtr(new GraphicsLayerFactoryChromium(this))) we have a WebViewImpl* here, why not just pass that in to GraphicsLayerFactoryChromium and avoid the downcast, etc? > Source/WebKit/chromium/src/WebViewImpl.cpp:1739 > + double wallClockFrameBeginTime = currentTime(); ick, why are you grabbing a wall clock time here? this isn't going to be a useful value for anyone
Ali Juma
Comment 4 2013-02-20 13:17:52 PST
Ali Juma
Comment 5 2013-02-20 13:22:11 PST
Starting orphaned animations before they get added to the tree is no longer part of the plan. This means the changes involving times are no longer needed. (In reply to comment #3) > (From update of attachment 182191 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=182191&action=review > > > Source/Platform/chromium/public/WebLayerTreeView.h:154 > > - virtual void updateAnimations(double frameBeginTime) = 0; > > + virtual void updateAnimations(double monotonicFrameBeginTime, double wallClockFrameBegin) = 0; > > this is going to busterate the build unless a chromium-side patch implementing both changes has landed in chromium and rolled in. please put the chromium rev# here on this bug when you do that This change has been removed. > > Source/WebKit/chromium/src/ChromeClientImpl.cpp:134 > > + WebKit::ChromeClientImpl* m_chromeClient; // weak pointer > > what makes sure this pointer won't outlive the object it points to? saying it's a weak pointer doesn't add anything (that's clear from the type) - what would be useful in a comment would be describing the lifecycle that makes it a *safe* weak pointer Done (for m_webView, which we replaced m_chromeClient as a result of the comment below). > > Source/WebKit/chromium/src/ChromeClientImpl.cpp:174 > > + , m_graphicsLayerFactory(adoptPtr(new GraphicsLayerFactoryChromium(this))) > > we have a WebViewImpl* here, why not just pass that in to GraphicsLayerFactoryChromium and avoid the downcast, etc? Done. > > Source/WebKit/chromium/src/WebViewImpl.cpp:1739 > > + double wallClockFrameBeginTime = currentTime(); > > ick, why are you grabbing a wall clock time here? this isn't going to be a useful value for anyone This change has been removed.
WebKit Review Bot
Comment 6 2013-02-20 13:24:59 PST
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
James Robinson
Comment 7 2013-02-20 17:23:53 PST
Comment on attachment 189364 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=189364&action=review > Source/WebKit/chromium/src/ChromeClientImpl.cpp:120 > + GraphicsLayerFactoryChromium(WebKit::WebViewImpl* webView) explicit > Source/WebKit/chromium/src/ChromeClientImpl.cpp:136 > + // GraphicsLayerFactoryChromium's lifetime is bounded by that of its owning > + // ChromeClientImpl, whose own lifetime is bounded by that of m_webView. Hmm - you'll have to remind me. Why doesn't the WebViewImpl just own this object directly?
Ali Juma
Comment 8 2013-02-21 08:25:21 PST
(In reply to comment #7) > (From update of attachment 189364 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=189364&action=review > > > Source/WebKit/chromium/src/ChromeClientImpl.cpp:120 > > + GraphicsLayerFactoryChromium(WebKit::WebViewImpl* webView) > > explicit > > > Source/WebKit/chromium/src/ChromeClientImpl.cpp:136 > > + // GraphicsLayerFactoryChromium's lifetime is bounded by that of its owning > > + // ChromeClientImpl, whose own lifetime is bounded by that of m_webView. > > Hmm - you'll have to remind me. Why doesn't the WebViewImpl just own this object directly? WebViewImpl could own this directly. As I understand it, the only reason it's currently owned by ChromeClientImpl is that this seemed to be a logical place for it since ChromeClientImpl defines a ::graphicsLayerFactory method.
Ali Juma
Comment 9 2013-02-22 09:01:39 PST
Ali Juma
Comment 10 2013-02-22 09:03:15 PST
(In reply to comment #7) > (From update of attachment 189364 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=189364&action=review > > > Source/WebKit/chromium/src/ChromeClientImpl.cpp:120 > > + GraphicsLayerFactoryChromium(WebKit::WebViewImpl* webView) > > explicit Done. > > Source/WebKit/chromium/src/ChromeClientImpl.cpp:136 > > + // GraphicsLayerFactoryChromium's lifetime is bounded by that of its owning > > + // ChromeClientImpl, whose own lifetime is bounded by that of m_webView. > > Hmm - you'll have to remind me. Why doesn't the WebViewImpl just own this object directly? WebViewImpl now owns this object directly.
James Robinson
Comment 11 2013-02-22 10:18:11 PST
Comment on attachment 189777 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=189777&action=review R=me - one change suggested before landing. You don't need to ask me for another review after moving that, just ask any friendly neighborhood WebKit committer to help you out. Thanks for the iterations and explanations! > Source/WebKit/chromium/src/WebViewImpl.cpp:212 > +class GraphicsLayerFactoryChromium : public GraphicsLayerFactory { WebViewImpl.cpp is kind of gigantic, so I would consider moving this class out to its own header/cpp just to cut down on churn.
Ali Juma
Comment 12 2013-02-22 11:58:52 PST
Created attachment 189805 [details] Patch for landing
WebKit Review Bot
Comment 13 2013-02-22 14:44:45 PST
Comment on attachment 189805 [details] Patch for landing Clearing flags on attachment: 189805 Committed r143803: <http://trac.webkit.org/changeset/143803>
WebKit Review Bot
Comment 14 2013-02-22 14:44:49 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.