Changeset 169229 in webkit
- Timestamp:
- May 22, 2014 4:57:46 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r169221 r169229 1 2014-05-22 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION (r155977): Very stuttery 3D css animation on jtechcommunications.com 4 https://bugs.webkit.org/show_bug.cgi?id=133179 5 <rdar://problem/16864666> 6 7 Reviewed by Dean Jackson. 8 9 Rebaseline. 10 11 * compositing/contents-scale/animating-expected.txt: 12 * compositing/contents-scale/rounded-contents-scale-expected.txt: 13 * compositing/contents-scale/scaled-ancestor-expected.txt: 14 * compositing/contents-scale/simple-scale-expected.txt: 15 * compositing/contents-scale/z-translate-expected.txt: 16 * platform/mac/compositing/overflow/composited-scrolling-paint-phases-expected.txt: 17 * platform/mac/compositing/tiling/rotated-tiled-clamped-expected.txt: 18 * platform/mac/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: 19 * platform/mac/compositing/visible-rect/nested-transform-expected.txt: 20 1 21 2014-05-22 Mark Lam <mark.lam@apple.com> 2 22 -
trunk/LayoutTests/compositing/contents-scale/animating-expected.txt
r168244 r169229 20 20 (transform [1.50 0.00 0.00 0.00] [0.00 1.50 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00]) 21 21 (visible rect 0.00, 0.00 100.00 x 100.00) 22 (contentsScale 3.00)22 (contentsScale 1.00) 23 23 ) 24 24 ) -
trunk/LayoutTests/compositing/contents-scale/rounded-contents-scale-expected.txt
r168244 r169229 24 24 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 -200.00 1.00]) 25 25 (visible rect 0.00, 0.00 102.00 x 102.00) 26 (contentsScale 0.75)26 (contentsScale 1.00) 27 27 ) 28 28 (GraphicsLayer … … 33 33 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 -100.00 1.00]) 34 34 (visible rect 0.00, 0.00 102.00 x 102.00) 35 (contentsScale 0.75)35 (contentsScale 1.00) 36 36 ) 37 37 (GraphicsLayer … … 59 59 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 100.00 1.00]) 60 60 (visible rect 0.00, 0.00 102.00 x 102.00) 61 (contentsScale 1. 25)61 (contentsScale 1.00) 62 62 ) 63 63 (GraphicsLayer … … 68 68 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 150.00 1.00]) 69 69 (visible rect 0.00, 0.00 102.00 x 4.40) 70 (contentsScale 1. 50)70 (contentsScale 1.00) 71 71 ) 72 72 ) -
trunk/LayoutTests/compositing/contents-scale/scaled-ancestor-expected.txt
r168244 r169229 19 19 (transform [2.00 0.00 0.00 0.00] [0.00 2.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00]) 20 20 (visible rect 0.00, 0.00 102.00 x 102.00) 21 (contentsScale 2.00)21 (contentsScale 1.00) 22 22 (children 1 23 23 (GraphicsLayer … … 27 27 (drawsContent 1) 28 28 (visible rect 0.00, 0.00 100.00 x 100.00) 29 (contentsScale 2.00)29 (contentsScale 1.00) 30 30 ) 31 31 ) -
trunk/LayoutTests/compositing/contents-scale/simple-scale-expected.txt
r168244 r169229 20 20 (transform [2.00 0.00 0.00 0.00] [0.00 2.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00]) 21 21 (visible rect 0.00, 0.00 100.00 x 100.00) 22 (contentsScale 2.00)22 (contentsScale 1.00) 23 23 ) 24 24 ) -
trunk/LayoutTests/compositing/contents-scale/z-translate-expected.txt
r168244 r169229 28 28 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 100.00 1.00]) 29 29 (visible rect 0.00, 0.00 100.00 x 100.00) 30 (contentsScale 1. 25)30 (contentsScale 1.00) 31 31 (children 1 32 32 (GraphicsLayer … … 38 38 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 100.00 1.00]) 39 39 (visible rect 0.00, 0.00 100.00 x 100.00) 40 (contentsScale 1. 75)40 (contentsScale 1.00) 41 41 ) 42 42 ) -
trunk/LayoutTests/platform/mac/compositing/overflow/composited-scrolling-paint-phases-expected.txt
r168244 r169229 29 29 (GraphicsLayer 30 30 (position 1.00 1.00) 31 (bounds 200.00 200.00)31 (bounds 185.00 185.00) 32 32 (paintingPhases 33 33 GraphicsLayerPaintBackground -
trunk/LayoutTests/platform/mac/compositing/tiling/rotated-tiled-clamped-expected.txt
r168244 r169229 33 33 (transform [0.17 0.00 -0.98 0.00] [0.00 1.00 0.00 0.00] [0.98 0.00 0.17 0.00] [0.00 0.00 0.00 1.00]) 34 34 (visible rect 0.00, 0.00 2800.00 x 300.00) 35 (contentsScale 0.75)35 (contentsScale 1.00) 36 36 (tile cache coverage 0, 0 2800 x 300) 37 37 (tile size 512 x 512) 38 (top left tile 0, 0 tiles grid 5x 1)38 (top left tile 0, 0 tiles grid 6 x 1) 39 39 ) 40 40 ) -
trunk/LayoutTests/platform/mac/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt
r168244 r169229 39 39 (transform [0.17 0.00 -0.98 0.00] [0.00 1.00 0.00 0.00] [0.98 0.00 0.17 0.00] [0.00 0.00 0.00 1.00]) 40 40 (visible rect 0.00, 0.00 2800.00 x 300.00) 41 (contentsScale 0.75)41 (contentsScale 1.00) 42 42 (tile cache coverage 0, 0 2800 x 300) 43 43 (tile size 512 x 512) 44 (top left tile 0, 0 tiles grid 5x 1)44 (top left tile 0, 0 tiles grid 6 x 1) 45 45 ) 46 46 ) -
trunk/LayoutTests/platform/mac/compositing/visible-rect/nested-transform-expected.txt
r168244 r169229 29 29 (transform [0.94 0.00 -0.34 0.00] [0.00 1.00 0.00 0.00] [0.34 0.00 0.94 0.00] [0.00 0.00 0.00 1.00]) 30 30 (visible rect 0.00, 0.00 0.00 x 0.00) 31 (contentsScale 1. 25)31 (contentsScale 1.00) 32 32 (children 1 33 33 (GraphicsLayer … … 36 36 (transform [0.94 0.00 -0.34 0.00] [0.00 1.00 0.00 0.00] [0.34 0.00 0.94 0.00] [0.00 0.00 0.00 1.00]) 37 37 (visible rect 0.00, 0.00 0.00 x 0.00) 38 (contentsScale 1. 50)38 (contentsScale 1.00) 39 39 (children 1 40 40 (GraphicsLayer … … 77 77 (transform [0.77 0.00 -0.64 0.00] [0.00 1.00 0.00 0.00] [0.64 0.00 0.77 0.00] [0.00 0.00 0.00 1.00]) 78 78 (visible rect 0.00, 0.00 0.00 x 0.00) 79 (contentsScale 1. 75)79 (contentsScale 1.00) 80 80 (children 1 81 81 (GraphicsLayer … … 84 84 (transform [1.00 0.00 0.00 0.00] [0.00 0.82 0.57 0.00] [0.00 -0.57 0.82 0.00] [0.00 0.00 0.00 1.00]) 85 85 (visible rect 0.00, 0.00 500.00 x 351.87) 86 (contentsScale 1. 25)86 (contentsScale 1.00) 87 87 ) 88 88 ) -
trunk/Source/WebCore/ChangeLog
r169223 r169229 1 2014-05-22 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION (r155977): Very stuttery 3D css animation on jtechcommunications.com 4 https://bugs.webkit.org/show_bug.cgi?id=133179 5 <rdar://problem/16864666> 6 7 Reviewed by Dean Jackson. 8 9 Revert code added in r155977 to try to pick a good contentsScale for layers 10 based on a root-relative transform. This resulted in pages with too much 11 backing store, and too many cases where layers repainted during animations, 12 causing stutter. 13 14 * platform/graphics/ca/GraphicsLayerCA.cpp: 15 (WebCore::GraphicsLayerCA::GraphicsLayerCA): 16 (WebCore::GraphicsLayerCA::flushCompositingState): 17 (WebCore::GraphicsLayerCA::recursiveCommitChanges): 18 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): 19 (WebCore::GraphicsLayerCA::updateContentsOpaque): 20 (WebCore::GraphicsLayerCA::updateAnimations): 21 (WebCore::GraphicsLayerCA::appendToUncommittedAnimations): 22 (WebCore::GraphicsLayerCA::setTransformAnimationEndpoints): 23 (WebCore::GraphicsLayerCA::setTransformAnimationKeyframes): 24 (WebCore::GraphicsLayerCA::updateContentsScale): 25 (WebCore::clampedContentsScaleForScale): Deleted. 26 (WebCore::maxScaleFromTransform): Deleted. 27 (WebCore::GraphicsLayerCA::updateRootRelativeScale): Deleted. 28 (WebCore::GraphicsLayerCA::getTransformFromAnimationsWithMaxScaleImpact): Deleted. 29 * platform/graphics/ca/GraphicsLayerCA.h: 30 1 31 2014-05-22 Martin Hock <mhock@apple.com> 2 32 -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r169161 r169229 86 86 { 87 87 return static_cast<int>(value) == value; 88 }89 90 static float clampedContentsScaleForScale(float rootRelativeScale, float fixedScale)91 {92 // To avoid too many repaints when the root-relative scale of layers changes, round93 // the scale to the nearest 0.25.94 const float roundingFactor = 4;95 float scale = roundf(rootRelativeScale * roundingFactor) / roundingFactor;96 97 scale *= fixedScale;98 99 // Define some reasonable limits.100 const float maxScale = 8;101 const float minScale = 0.01f;102 103 return std::max(minScale, std::min(scale, maxScale));104 88 } 105 89 … … 288 272 } 289 273 290 static float maxScaleFromTransform(const TransformationMatrix& t)291 {292 if (t.isIdentityOrTranslation())293 return 1;294 295 TransformationMatrix::Decomposed4Type decomposeData;296 if (!t.decompose4(decomposeData))297 return 1;298 299 return std::max(fabsf(narrowPrecisionToFloat(decomposeData.scaleX)), fabsf(narrowPrecisionToFloat(decomposeData.scaleY)));300 }301 302 274 #if ENABLE(CSS_FILTERS) || !ASSERT_DISABLED 303 275 static inline bool supportsAcceleratedFilterAnimations() … … 367 339 , m_contentsLayerPurpose(NoContentsLayer) 368 340 , m_isPageTiledBackingLayer(false) 369 , m_rootRelativeScaleFactor(1)370 341 , m_uncommittedChanges(0) 371 342 , m_isCommittingChanges(false) … … 1025 996 { 1026 997 TransformState state(TransformState::UnapplyInverseTransformDirection, FloatQuad(clipRect)); 1027 TransformationMatrix rootRelativeTransform; 1028 recursiveCommitChanges(CommitState(), state, rootRelativeTransform); 998 recursiveCommitChanges(CommitState(), state); 1029 999 } 1030 1000 … … 1164 1134 } 1165 1135 1166 void GraphicsLayerCA::updateRootRelativeScale(TransformationMatrix* transformFromRoot)1167 {1168 if (!transformFromRoot)1169 return;1170 1171 float rootRelativeScaleFactor;1172 TransformationMatrix maxScaleImpactTransform;1173 bool haveTransformAnimation = getTransformFromAnimationsWithMaxScaleImpact(*transformFromRoot, maxScaleImpactTransform, rootRelativeScaleFactor);1174 if (haveTransformAnimation)1175 transformFromRoot->multiply(maxScaleImpactTransform);1176 else if (!appliesPageScale()) {1177 TransformationMatrix unanimatedTransform = this->layerTransform(m_position);1178 transformFromRoot->multiply(unanimatedTransform);1179 rootRelativeScaleFactor = maxScaleFromTransform(*transformFromRoot);1180 }1181 1182 if (rootRelativeScaleFactor != m_rootRelativeScaleFactor) {1183 m_rootRelativeScaleFactor = rootRelativeScaleFactor;1184 m_uncommittedChanges |= ContentsScaleChanged | ContentsOpaqueChanged;1185 }1186 }1187 1188 1136 // rootRelativeTransformForScaling is a transform from the root, but for layers with transform animations, it cherry-picked the state of the 1189 1137 // animation that contributes maximally to the scale (on every layer with animations down the hierarchy). 1190 void GraphicsLayerCA::recursiveCommitChanges(const CommitState& commitState, const TransformState& state, const TransformationMatrix& rootRelativeTransformForScaling,float pageScaleFactor, const FloatPoint& positionRelativeToBase, bool affectedByPageScale)1138 void GraphicsLayerCA::recursiveCommitChanges(const CommitState& commitState, const TransformState& state, float pageScaleFactor, const FloatPoint& positionRelativeToBase, bool affectedByPageScale) 1191 1139 { 1192 1140 TransformState localState = state; … … 1236 1184 baseRelativePosition += m_position; 1237 1185 1238 TransformationMatrix transformFromRoot = rootRelativeTransformForScaling;1239 1186 { 1240 1187 TemporaryChange<bool> committingChangesChange(m_isCommittingChanges, true); 1241 commitLayerChangesBeforeSublayers(childCommitState, pageScaleFactor, baseRelativePosition, oldVisibleRect , &transformFromRoot);1188 commitLayerChangesBeforeSublayers(childCommitState, pageScaleFactor, baseRelativePosition, oldVisibleRect); 1242 1189 } 1243 1190 … … 1257 1204 for (size_t i = 0; i < numChildren; ++i) { 1258 1205 GraphicsLayerCA* curChild = static_cast<GraphicsLayerCA*>(childLayers[i]); 1259 curChild->recursiveCommitChanges(childCommitState, localState, transformFromRoot,pageScaleFactor, baseRelativePosition, affectedByPageScale);1206 curChild->recursiveCommitChanges(childCommitState, localState, pageScaleFactor, baseRelativePosition, affectedByPageScale); 1260 1207 } 1261 1208 1262 1209 if (m_replicaLayer) 1263 static_cast<GraphicsLayerCA*>(m_replicaLayer)->recursiveCommitChanges(childCommitState, localState, transformFromRoot,pageScaleFactor, baseRelativePosition, affectedByPageScale);1210 static_cast<GraphicsLayerCA*>(m_replicaLayer)->recursiveCommitChanges(childCommitState, localState, pageScaleFactor, baseRelativePosition, affectedByPageScale); 1264 1211 1265 1212 if (m_maskLayer) … … 1318 1265 } 1319 1266 1320 void GraphicsLayerCA::commitLayerChangesBeforeSublayers(CommitState& commitState, float pageScaleFactor, const FloatPoint& positionRelativeToBase, const FloatRect& oldVisibleRect , TransformationMatrix* transformFromRoot)1267 void GraphicsLayerCA::commitLayerChangesBeforeSublayers(CommitState& commitState, float pageScaleFactor, const FloatPoint& positionRelativeToBase, const FloatRect& oldVisibleRect) 1321 1268 { 1322 1269 ++commitState.treeDepth; … … 1328 1275 if (commitState.treeDepth > cMaxLayerTreeDepth) 1329 1276 m_uncommittedChanges |= ChildrenChanged; 1330 1331 updateRootRelativeScale(transformFromRoot);1332 return;1333 1277 } 1334 1278 … … 1399 1343 if (m_uncommittedChanges & AnimationChanged) 1400 1344 updateAnimations(); 1401 1402 // After committing animations, see if we need to adjust contentsScale accordingly.1403 updateRootRelativeScale(transformFromRoot);1404 1345 1405 1346 // Updating the contents scale can cause parts of the layer to be invalidated, … … 1660 1601 bool contentsOpaque = m_contentsOpaque; 1661 1602 if (contentsOpaque) { 1662 float contentsScale = clampedContentsScaleForScale(m_rootRelativeScaleFactor, pageScaleFactor * deviceScaleFactor());1603 float contentsScale = pageScaleFactor * deviceScaleFactor(); 1663 1604 if (!isIntegral(contentsScale) && !m_client.paintsOpaquelyAtNonIntegralScales(this)) 1664 1605 contentsOpaque = false; … … 2161 2102 void GraphicsLayerCA::updateAnimations() 2162 2103 { 2163 HashSet<String> finishedAnimations;2164 2165 2104 if (m_animationsToProcess.size()) { 2166 2105 AnimationsToProcessMap::const_iterator end = m_animationsToProcess.end(); … … 2185 2124 } 2186 2125 2187 if (processingInfo.action == Remove) {2126 if (processingInfo.action == Remove) 2188 2127 m_runningAnimations.remove(currAnimationName); 2189 finishedAnimations.add(currAnimationName);2190 }2191 2128 } 2192 2129 … … 2210 2147 animations.append(pendingAnimation); 2211 2148 } 2212 2213 finishedAnimations.remove(pendingAnimation.m_name);2214 2149 } 2215 2150 m_uncomittedAnimations.clear(); 2216 2151 } 2217 2218 HashSet<String>::const_iterator end = finishedAnimations.end();2219 for (HashSet<String>::const_iterator it = finishedAnimations.begin(); it != end; ++it)2220 m_animationTransforms.remove(*it);2221 2152 } 2222 2153 … … 2382 2313 2383 2314 RefPtr<PlatformCAAnimation> caAnimation; 2384 Vector<TransformationMatrix> matrices;2385 2315 bool validMatrices = true; 2386 2316 if (isKeyframe) { 2387 2317 caAnimation = createKeyframeAnimation(animation, propertyIdToString(valueList.property()), additive); 2388 validMatrices = setTransformAnimationKeyframes(valueList, animation, caAnimation.get(), animationIndex, transformOp, isMatrixAnimation, boxSize , matrices);2318 validMatrices = setTransformAnimationKeyframes(valueList, animation, caAnimation.get(), animationIndex, transformOp, isMatrixAnimation, boxSize); 2389 2319 } else { 2390 2320 caAnimation = createBasicAnimation(animation, propertyIdToString(valueList.property()), additive); 2391 validMatrices = setTransformAnimationEndpoints(valueList, animation, caAnimation.get(), animationIndex, transformOp, isMatrixAnimation, boxSize , matrices);2321 validMatrices = setTransformAnimationEndpoints(valueList, animation, caAnimation.get(), animationIndex, transformOp, isMatrixAnimation, boxSize); 2392 2322 } 2393 2323 … … 2395 2325 return false; 2396 2326 2397 m_animationTransforms.set(animationName, matrices);2398 2399 2327 m_uncomittedAnimations.append(LayerPropertyAnimation(caAnimation, animationName, valueList.property(), animationIndex, 0, timeOffset)); 2400 2328 return true; 2401 }2402 2403 bool GraphicsLayerCA::getTransformFromAnimationsWithMaxScaleImpact(const TransformationMatrix& parentTransformFromRoot, TransformationMatrix& maxScaleTransform, float& maxScale) const2404 {2405 maxScale = 1;2406 2407 bool haveTransformAnimation = false;2408 AnimationsMap::const_iterator end = m_runningAnimations.end();2409 for (AnimationsMap::const_iterator it = m_runningAnimations.begin(); it != end; ++it) {2410 const Vector<LayerPropertyAnimation>& propertyAnimations = it->value;2411 size_t numAnimations = propertyAnimations.size();2412 for (size_t i = 0; i < numAnimations; ++i) {2413 const LayerPropertyAnimation& animation = propertyAnimations[i];2414 if (animation.m_property != AnimatedPropertyWebkitTransform)2415 continue;2416 2417 haveTransformAnimation = true;2418 2419 TransformsMap::const_iterator it = m_animationTransforms.find(animation.m_name);2420 if (it != m_animationTransforms.end()) {2421 const Vector<TransformationMatrix>& matrices = it->value;2422 2423 for (size_t i = 0; i < matrices.size(); ++i) {2424 TransformationMatrix rootRelativeTransformWithAnimation = parentTransformFromRoot;2425 TransformationMatrix layerTransformWithAnimation = layerTransform(m_position, &matrices[i]);2426 2427 rootRelativeTransformWithAnimation.multiply(layerTransformWithAnimation);2428 2429 float rootRelativeScale = maxScaleFromTransform(rootRelativeTransformWithAnimation);2430 if (rootRelativeScale > maxScale) {2431 maxScale = rootRelativeScale;2432 maxScaleTransform = matrices[i];2433 }2434 }2435 }2436 }2437 }2438 2439 return haveTransformAnimation;2440 2329 } 2441 2330 … … 2676 2565 } 2677 2566 2678 bool GraphicsLayerCA::setTransformAnimationEndpoints(const KeyframeValueList& valueList, const Animation* animation, PlatformCAAnimation* basicAnim, int functionIndex, TransformOperation::OperationType transformOpType, bool isMatrixAnimation, const FloatSize& boxSize , Vector<TransformationMatrix>& matrixes)2567 bool GraphicsLayerCA::setTransformAnimationEndpoints(const KeyframeValueList& valueList, const Animation* animation, PlatformCAAnimation* basicAnim, int functionIndex, TransformOperation::OperationType transformOpType, bool isMatrixAnimation, const FloatSize& boxSize) 2679 2568 { 2680 2569 ASSERT(valueList.size() == 2); … … 2688 2577 const TransformAnimationValue& endValue = static_cast<const TransformAnimationValue&>(valueList.at(toIndex)); 2689 2578 2690 TransformationMatrix fromTransform, toTransform;2691 2692 2579 if (isMatrixAnimation) { 2580 TransformationMatrix fromTransform, toTransform; 2693 2581 startValue.value().apply(boxSize, fromTransform); 2694 2582 endValue.value().apply(boxSize, toTransform); … … 2726 2614 basicAnim->setToValue(toValue); 2727 2615 } 2728 2729 startValue.value().apply(boxSize, fromTransform); 2730 endValue.value().apply(boxSize, toTransform); 2731 } 2732 matrixes.append(fromTransform); 2733 matrixes.append(toTransform); 2616 } 2734 2617 2735 2618 // This codepath is used for 2-keyframe animations, so we still need to look in the start … … 2745 2628 } 2746 2629 2747 bool GraphicsLayerCA::setTransformAnimationKeyframes(const KeyframeValueList& valueList, const Animation* animation, PlatformCAAnimation* keyframeAnim, int functionIndex, TransformOperation::OperationType transformOpType, bool isMatrixAnimation, const FloatSize& boxSize , Vector<TransformationMatrix>& matrixes)2630 bool GraphicsLayerCA::setTransformAnimationKeyframes(const KeyframeValueList& valueList, const Animation* animation, PlatformCAAnimation* keyframeAnim, int functionIndex, TransformOperation::OperationType transformOpType, bool isMatrixAnimation, const FloatSize& boxSize) 2748 2631 { 2749 2632 Vector<float> keyTimes; … … 2789 2672 } 2790 2673 2791 matrixes.append(transform);2792 2793 2674 if (i < (valueList.size() - 1)) 2794 2675 timingFunctions.append(timingFunctionForAnimationValue(forwards ? curValue : valueList.at(index - 1), *animation)); … … 2941 2822 void GraphicsLayerCA::updateContentsScale(float pageScaleFactor) 2942 2823 { 2943 float contentsScale = clampedContentsScaleForScale(m_rootRelativeScaleFactor, pageScaleFactor * deviceScaleFactor());2824 float contentsScale = pageScaleFactor * deviceScaleFactor(); 2944 2825 2945 2826 if (m_isPageTiledBackingLayer && tiledBacking()) { … … 2960 2841 return; 2961 2842 } 2843 2962 2844 if (drawsContent()) 2963 2845 m_layer->setNeedsDisplay(); -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
r168559 r169229 157 157 { } 158 158 }; 159 void recursiveCommitChanges(const CommitState&, const TransformState&, const TransformationMatrix& rootRelativeTransformForScaling,float pageScaleFactor = 1, const FloatPoint& positionRelativeToBase = FloatPoint(), bool affectedByPageScale = false);159 void recursiveCommitChanges(const CommitState&, const TransformState&, float pageScaleFactor = 1, const FloatPoint& positionRelativeToBase = FloatPoint(), bool affectedByPageScale = false); 160 160 161 161 virtual void flushCompositingState(const FloatRect&) override; … … 244 244 bool setAnimationKeyframes(const KeyframeValueList&, const Animation*, PlatformCAAnimation*); 245 245 246 bool setTransformAnimationEndpoints(const KeyframeValueList&, const Animation*, PlatformCAAnimation*, int functionIndex, TransformOperation::OperationType, bool isMatrixAnimation, const FloatSize& boxSize , Vector<TransformationMatrix>& matrixes);247 bool setTransformAnimationKeyframes(const KeyframeValueList&, const Animation*, PlatformCAAnimation*, int functionIndex, TransformOperation::OperationType, bool isMatrixAnimation, const FloatSize& boxSize , Vector<TransformationMatrix>& matrixes);246 bool setTransformAnimationEndpoints(const KeyframeValueList&, const Animation*, PlatformCAAnimation*, int functionIndex, TransformOperation::OperationType, bool isMatrixAnimation, const FloatSize& boxSize); 247 bool setTransformAnimationKeyframes(const KeyframeValueList&, const Animation*, PlatformCAAnimation*, int functionIndex, TransformOperation::OperationType, bool isMatrixAnimation, const FloatSize& boxSize); 248 248 249 249 #if ENABLE(CSS_FILTERS) … … 259 259 } 260 260 261 void commitLayerChangesBeforeSublayers(CommitState&, float pageScaleFactor, const FloatPoint& positionRelativeToBase, const FloatRect& oldVisibleRect , TransformationMatrix* transformFromRoot = 0);261 void commitLayerChangesBeforeSublayers(CommitState&, float pageScaleFactor, const FloatPoint& positionRelativeToBase, const FloatRect& oldVisibleRect); 262 262 void commitLayerChangesAfterSublayers(CommitState&); 263 263 … … 268 268 269 269 CompositingCoordinatesOrientation defaultContentsOrientation() const; 270 270 271 271 void setupContentsLayer(PlatformCALayer*); 272 272 PlatformCALayer* contentsLayer() const { return m_contentsLayer.get(); } … … 281 281 282 282 TransformationMatrix layerTransform(const FloatPoint& position, const TransformationMatrix* customTransform = 0) const; 283 void updateRootRelativeScale(TransformationMatrix* transformFromRoot);284 283 285 284 enum ComputeVisibleRectFlag { RespectAnimatingTransforms = 1 << 0 }; … … 412 411 #endif 413 412 414 // Returns true if any transform animations are running.415 bool getTransformFromAnimationsWithMaxScaleImpact(const TransformationMatrix& parentTransformFromRoot, TransformationMatrix&, float& maxScale) const;416 417 413 enum LayerChange { 418 414 NoChange = 0, … … 487 483 bool m_isPageTiledBackingLayer : 1; 488 484 489 float m_rootRelativeScaleFactor;490 491 485 Color m_contentsSolidColor; 492 486 … … 534 528 AnimationsMap m_runningAnimations; 535 529 536 // Map from animation key to TransformationMatrices for animations of transform. The vector contains a matrix for537 // the two endpoints, or each keyframe. Used for contentsScale adjustment.538 typedef HashMap<String, Vector<TransformationMatrix>> TransformsMap;539 TransformsMap m_animationTransforms;540 541 530 Vector<FloatRect> m_dirtyRects; 542 531
Note: See TracChangeset
for help on using the changeset viewer.