Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3213)

Unified Diff: Source/web/WebViewImpl.cpp

Issue 1119763003: Animations: Port LinkHighlight to use compositor timelines. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« Source/web/WebViewImpl.h ('K') | « Source/web/WebViewImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 3b9352dfb0b5cd7588dce6db828fd7b68ee4e8f8..044d6cda2f76bd45bd8f815244b55ccd9c85a2a4 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -118,6 +118,7 @@
#include "platform/weborigin/SchemeRegistry.h"
#include "public/platform/Platform.h"
#include "public/platform/WebCompositeAndReadbackAsyncCallback.h"
+#include "public/platform/WebCompositorSupport.h"
#include "public/platform/WebDragData.h"
#include "public/platform/WebFloatPoint.h"
#include "public/platform/WebGestureCurve.h"
@@ -2689,6 +2690,11 @@ bool WebViewImpl::isAcceleratedCompositingActive() const
void WebViewImpl::willCloseLayerTreeView()
{
+ if (m_linkHighlightsTimeline) {
+ detachCompositorAnimationTimeline(m_linkHighlightsTimeline.get());
+ m_linkHighlightsTimeline.clear();
+ }
+
setRootGraphicsLayer(nullptr);
m_layerTreeView = 0;
}
@@ -4183,6 +4189,11 @@ void WebViewImpl::initializeLayerTreeView()
// FIXME: only unittests, click to play, Android priting, and printing (for headers and footers)
// make this assert necessary. We should make them not hit this code and then delete allowsBrokenNullLayerTreeView.
ASSERT(m_layerTreeView || !m_client || m_client->allowsBrokenNullLayerTreeView());
+
+ if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && Platform::current()->compositorSupport() && m_layerTreeView) {
chrishtr 2015/07/15 14:25:14 Add assert for compositorSupport()
loyso (OOO) 2015/07/21 01:19:07 Done.
+ m_linkHighlightsTimeline = adoptPtr(Platform::current()->compositorSupport()->createAnimationTimeline());
+ attachCompositorAnimationTimeline(m_linkHighlightsTimeline.get());
+ }
}
void WebViewImpl::applyViewportDeltas(
« Source/web/WebViewImpl.h ('K') | « Source/web/WebViewImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698