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

Side by Side Diff: third_party/WebKit/Source/web/LinkHighlightImpl.cpp

Issue 1410873003: CC Animations: Fix isThreadedAnimationEnabled mode for layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 , m_startTime(monotonicallyIncreasingTime()) 75 , m_startTime(monotonicallyIncreasingTime())
76 { 76 {
77 ASSERT(m_node); 77 ASSERT(m_node);
78 ASSERT(owningWebViewImpl); 78 ASSERT(owningWebViewImpl);
79 WebCompositorSupport* compositorSupport = Platform::current()->compositorSup port(); 79 WebCompositorSupport* compositorSupport = Platform::current()->compositorSup port();
80 ASSERT(compositorSupport); 80 ASSERT(compositorSupport);
81 m_contentLayer = adoptPtr(compositorSupport->createContentLayer(this)); 81 m_contentLayer = adoptPtr(compositorSupport->createContentLayer(this));
82 m_clipLayer = adoptPtr(compositorSupport->createLayer()); 82 m_clipLayer = adoptPtr(compositorSupport->createLayer());
83 m_clipLayer->setTransformOrigin(WebFloatPoint3D()); 83 m_clipLayer->setTransformOrigin(WebFloatPoint3D());
84 m_clipLayer->addChild(m_contentLayer->layer()); 84 m_clipLayer->addChild(m_contentLayer->layer());
85 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && Platfor m::current()->isThreadedAnimationEnabled()) { 85 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled()) {
86 m_compositorPlayer = adoptPtr(compositorSupport->createAnimationPlayer() ); 86 m_compositorPlayer = adoptPtr(compositorSupport->createAnimationPlayer() );
87 ASSERT(m_compositorPlayer); 87 ASSERT(m_compositorPlayer);
88 m_compositorPlayer->setAnimationDelegate(this); 88 m_compositorPlayer->setAnimationDelegate(this);
89 m_owningWebViewImpl->linkHighlightsTimeline()->playerAttached(*this); 89 if (m_owningWebViewImpl->linkHighlightsTimeline())
90 m_owningWebViewImpl->linkHighlightsTimeline()->playerAttached(*this) ;
90 m_compositorPlayer->attachLayer(m_contentLayer->layer()); 91 m_compositorPlayer->attachLayer(m_contentLayer->layer());
91 } else { 92 } else {
92 owningWebViewImpl->registerForAnimations(m_contentLayer->layer()); 93 owningWebViewImpl->registerForAnimations(m_contentLayer->layer());
93 m_contentLayer->layer()->setAnimationDelegate(this); 94 m_contentLayer->layer()->setAnimationDelegate(this);
94 } 95 }
95 m_contentLayer->layer()->setDrawsContent(true); 96 m_contentLayer->layer()->setDrawsContent(true);
96 m_contentLayer->layer()->setOpacity(1); 97 m_contentLayer->layer()->setOpacity(1);
97 m_geometryNeedsUpdate = true; 98 m_geometryNeedsUpdate = true;
98 updateGeometry(); 99 updateGeometry();
99 } 100 }
100 101
101 LinkHighlightImpl::~LinkHighlightImpl() 102 LinkHighlightImpl::~LinkHighlightImpl()
102 { 103 {
103 if (m_compositorPlayer) { 104 if (m_compositorPlayer) {
104 m_compositorPlayer->detachLayer(); 105 m_compositorPlayer->detachLayer();
105 m_owningWebViewImpl->linkHighlightsTimeline()->playerDestroyed(*this); 106 if (m_owningWebViewImpl->linkHighlightsTimeline())
107 m_owningWebViewImpl->linkHighlightsTimeline()->playerDestroyed(*this );
106 m_compositorPlayer->setAnimationDelegate(nullptr); 108 m_compositorPlayer->setAnimationDelegate(nullptr);
107 } 109 }
108 m_compositorPlayer.clear(); 110 m_compositorPlayer.clear();
109 111
110 clearGraphicsLayerLinkHighlightPointer(); 112 clearGraphicsLayerLinkHighlightPointer();
111 releaseResources(); 113 releaseResources();
112 } 114 }
113 115
114 WebContentLayer* LinkHighlightImpl::contentLayer() 116 WebContentLayer* LinkHighlightImpl::contentLayer()
115 { 117 {
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 { 383 {
382 return clipLayer(); 384 return clipLayer();
383 } 385 }
384 386
385 WebCompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const 387 WebCompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const
386 { 388 {
387 return m_compositorPlayer.get(); 389 return m_compositorPlayer.get();
388 } 390 }
389 391
390 } // namespace blink 392 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698