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

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: Fix code review issues (add ASSERTs) 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
« no previous file with comments | « 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 e24d7cf4ea75998b159f7ccce774448532680c63..0ea604cb6c51abeec3a85071eff36d4bd5fe839b 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"
@@ -2673,6 +2674,11 @@ bool WebViewImpl::isAcceleratedCompositingActive() const
void WebViewImpl::willCloseLayerTreeView()
{
+ if (m_linkHighlightsTimeline) {
+ detachCompositorAnimationTimeline(m_linkHighlightsTimeline.get());
+ m_linkHighlightsTimeline.clear();
+ }
+
setRootGraphicsLayer(nullptr);
m_layerTreeView = 0;
}
@@ -4162,6 +4168,12 @@ 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() && m_layerTreeView) {
+ ASSERT(Platform::current()->compositorSupport());
+ m_linkHighlightsTimeline = adoptPtr(Platform::current()->compositorSupport()->createAnimationTimeline());
+ attachCompositorAnimationTimeline(m_linkHighlightsTimeline.get());
+ }
}
void WebViewImpl::applyViewportDeltas(
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698