Chromium Code Reviews| Index: third_party/WebKit/Source/web/LinkHighlightImpl.cpp |
| diff --git a/third_party/WebKit/Source/web/LinkHighlightImpl.cpp b/third_party/WebKit/Source/web/LinkHighlightImpl.cpp |
| index 10d13712a56efcd561b16ae567a1054d31fce905..d3cc9e153951bd9ebde790f0fe589ab470881667 100644 |
| --- a/third_party/WebKit/Source/web/LinkHighlightImpl.cpp |
| +++ b/third_party/WebKit/Source/web/LinkHighlightImpl.cpp |
| @@ -34,16 +34,17 @@ |
| #include "core/layout/LayoutView.h" |
| #include "core/layout/compositing/CompositedLayerMapping.h" |
| #include "core/paint/PaintLayer.h" |
| +#include "platform/CompositorFactory.h" |
| #include "platform/RuntimeEnabledFeatures.h" |
| +#include "platform/animation/WebCompositorAnimationCurve.h" |
| +#include "platform/animation/WebFloatAnimationCurve.h" |
| #include "platform/graphics/Color.h" |
| #include "platform/graphics/GraphicsLayer.h" |
| #include "platform/graphics/paint/DrawingRecorder.h" |
| #include "public/platform/Platform.h" |
| -#include "public/platform/WebCompositorAnimationCurve.h" |
| #include "public/platform/WebCompositorSupport.h" |
| #include "public/platform/WebContentLayer.h" |
| #include "public/platform/WebDisplayItemList.h" |
| -#include "public/platform/WebFloatAnimationCurve.h" |
| #include "public/platform/WebFloatPoint.h" |
| #include "public/platform/WebLayer.h" |
| #include "public/platform/WebRect.h" |
| @@ -83,7 +84,7 @@ LinkHighlightImpl::LinkHighlightImpl(Node* node, WebViewImpl* owningWebViewImpl) |
| m_clipLayer->setTransformOrigin(WebFloatPoint3D()); |
| m_clipLayer->addChild(m_contentLayer->layer()); |
| if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled()) { |
| - m_compositorPlayer = adoptPtr(compositorSupport->createAnimationPlayer()); |
| + m_compositorPlayer = adoptPtr(CompositorFactory::current().createAnimationPlayer()); |
| ASSERT(m_compositorPlayer); |
| m_compositorPlayer->setAnimationDelegate(this); |
| if (m_owningWebViewImpl->linkHighlightsTimeline()) |
| @@ -294,9 +295,7 @@ void LinkHighlightImpl::startHighlightAnimationIfNeeded() |
| m_contentLayer->layer()->setOpacity(startOpacity); |
| - WebCompositorSupport* compositorSupport = Platform::current()->compositorSupport(); |
| - |
| - OwnPtr<WebFloatAnimationCurve> curve = adoptPtr(compositorSupport->createFloatAnimationCurve()); |
| + OwnPtr<WebFloatAnimationCurve> curve = adoptPtr(CompositorFactory::current().createFloatAnimationCurve()); |
| curve->add(WebFloatKeyframe(0, startOpacity)); |
| // Make sure we have displayed for at least minPreFadeDuration before starting to fade out. |
| @@ -306,13 +305,13 @@ void LinkHighlightImpl::startHighlightAnimationIfNeeded() |
| // For layout tests we don't fade out. |
| curve->add(WebFloatKeyframe(fadeDuration + extraDurationRequired, layoutTestMode() ? startOpacity : 0)); |
| - OwnPtr<WebCompositorAnimation> animation = adoptPtr(compositorSupport->createAnimation(*curve, WebCompositorAnimation::TargetPropertyOpacity)); |
| + OwnPtr<WebCompositorAnimation> animation = adoptPtr(CompositorFactory::current().createAnimation(*curve, WebCompositorAnimation::TargetPropertyOpacity)); |
| m_contentLayer->layer()->setDrawsContent(true); |
| if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled()) |
| m_compositorPlayer->addAnimation(animation.leakPtr()); |
| else |
| - m_contentLayer->layer()->addAnimation(animation.leakPtr()); |
| + m_contentLayer->layer()->addAnimation(animation->releaseCCAnimation()); |
|
esprehn
2016/01/28 03:40:40
the web layer isn't really supposed to use cc type
loyso (OOO)
2016/01/28 07:10:09
This is intermediate state of things (see http://c
|
| invalidate(); |
| m_owningWebViewImpl->scheduleAnimation(); |