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

Side by Side Diff: Source/web/LinkHighlight.cpp

Issue 1089043003: Animations: Register LinkHighlight content layer for animations (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 , m_owningWebViewImpl(owningWebViewImpl) 70 , m_owningWebViewImpl(owningWebViewImpl)
71 , m_currentGraphicsLayer(0) 71 , m_currentGraphicsLayer(0)
72 , m_geometryNeedsUpdate(false) 72 , m_geometryNeedsUpdate(false)
73 , m_isAnimating(false) 73 , m_isAnimating(false)
74 , m_startTime(monotonicallyIncreasingTime()) 74 , m_startTime(monotonicallyIncreasingTime())
75 { 75 {
76 ASSERT(m_node); 76 ASSERT(m_node);
77 ASSERT(owningWebViewImpl); 77 ASSERT(owningWebViewImpl);
78 WebCompositorSupport* compositorSupport = Platform::current()->compositorSup port(); 78 WebCompositorSupport* compositorSupport = Platform::current()->compositorSup port();
79 m_contentLayer = adoptPtr(compositorSupport->createContentLayer(this)); 79 m_contentLayer = adoptPtr(compositorSupport->createContentLayer(this));
80 owningWebViewImpl->registerForAnimations(m_contentLayer->layer());
80 m_clipLayer = adoptPtr(compositorSupport->createLayer()); 81 m_clipLayer = adoptPtr(compositorSupport->createLayer());
81 m_clipLayer->setTransformOrigin(WebFloatPoint3D()); 82 m_clipLayer->setTransformOrigin(WebFloatPoint3D());
82 m_clipLayer->addChild(m_contentLayer->layer()); 83 m_clipLayer->addChild(m_contentLayer->layer());
83 m_contentLayer->layer()->setAnimationDelegate(this); 84 m_contentLayer->layer()->setAnimationDelegate(this);
loyso (OOO) 2015/04/24 03:26:54 Note: The problem is that LayerAnimationController
84 m_contentLayer->layer()->setDrawsContent(true); 85 m_contentLayer->layer()->setDrawsContent(true);
85 m_contentLayer->layer()->setOpacity(1); 86 m_contentLayer->layer()->setOpacity(1);
86 m_geometryNeedsUpdate = true; 87 m_geometryNeedsUpdate = true;
87 updateGeometry(); 88 updateGeometry();
88 } 89 }
89 90
90 LinkHighlight::~LinkHighlight() 91 LinkHighlight::~LinkHighlight()
91 { 92 {
92 clearGraphicsLayerLinkHighlightPointer(); 93 clearGraphicsLayerLinkHighlightPointer();
93 releaseResources(); 94 releaseResources();
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 // Make sure we update geometry on the next callback from WebViewImpl::layou t(). 361 // Make sure we update geometry on the next callback from WebViewImpl::layou t().
361 m_geometryNeedsUpdate = true; 362 m_geometryNeedsUpdate = true;
362 } 363 }
363 364
364 WebLayer* LinkHighlight::layer() 365 WebLayer* LinkHighlight::layer()
365 { 366 {
366 return clipLayer(); 367 return clipLayer();
367 } 368 }
368 369
369 } // namespace blink 370 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698