OLD | NEW |
---|---|
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/trees/layer_tree_host_common.h" | 5 #include "cc/trees/layer_tree_host_common.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
309 bool atLeastTwoLayersInSubtreeDrawContent = numDescendantsThatDrawContent > 0 && (layer->DrawsContent() || numDescendantsThatDrawContent > 1); | 309 bool atLeastTwoLayersInSubtreeDrawContent = numDescendantsThatDrawContent > 0 && (layer->DrawsContent() || numDescendantsThatDrawContent > 1); |
310 | 310 |
311 if (layer->opacity() != 1.f && !layer->preserves_3d() && atLeastTwoLayersInS ubtreeDrawContent) { | 311 if (layer->opacity() != 1.f && !layer->preserves_3d() && atLeastTwoLayersInS ubtreeDrawContent) { |
312 TRACE_EVENT_INSTANT0("cc", "LayerTreeHostCommon::requireSurface opacity" ); | 312 TRACE_EVENT_INSTANT0("cc", "LayerTreeHostCommon::requireSurface opacity" ); |
313 return true; | 313 return true; |
314 } | 314 } |
315 | 315 |
316 return false; | 316 return false; |
317 } | 317 } |
318 | 318 |
319 static LayerImpl* nextTargetSurface(LayerImpl* layer) | |
320 { | |
321 return layer->parent() ? layer->parent()->render_target() : 0; | |
322 } | |
323 | |
324 // This function returns a translation matrix that can be applied on a vector | |
325 // that's in the layer's target surface coordinate, while the position offset is | |
326 // specified in some ancestor layer's coordinate. | |
327 gfx::Transform computeTranslateInContainerLayerSpace(LayerImpl* layer, LayerImpl * container, const gfx::Vector2dF& positionOffset) | |
shawnsingh
2013/03/23 00:07:03
can we rename this to something like computeSizeDe
trchen
2013/03/26 01:45:28
Done.
| |
328 { | |
329 gfx::Transform resultTransform; | |
330 | |
331 // To apply a translate in the container's layer space, | |
332 // the following steps need to be done: | |
333 // Step 1a. transform from target surface space to the container's targe t surface space | |
334 // Step 1b. transform from container's target surface space to the conta iner's layer space | |
335 // Step 2. apply the compensation | |
336 // Step 3. transform back to target surface space | |
337 | |
338 gfx::Transform targetSurfaceSpaceToContainerLayerSpace; | |
shawnsingh
2013/03/23 00:07:03
There's some inconsistency in transform names in l
trchen
2013/03/26 01:45:28
I don't understand your suggestion here. No matter
| |
339 // Calculate step 1a | |
340 LayerImpl* containerTargetSurface = container ? container->render_target() : 0; | |
341 for (LayerImpl* currentTargetSurface = nextTargetSurface(layer); | |
342 currentTargetSurface && currentTargetSurface != containerTargetSurface; | |
343 currentTargetSurface = nextTargetSurface(currentTargetSurface)) { | |
344 targetSurfaceSpaceToContainerLayerSpace.ConcatTransform(currentTargetSur face->render_surface()->draw_transform()); | |
shawnsingh
2013/03/23 00:07:03
A comment about using Concat would be nice here, t
trchen
2013/03/26 01:45:28
Done.
| |
345 } | |
346 // Calculate step 1b | |
347 gfx::Transform containerTargetSurfaceSpaceToContainerLayerSpace; | |
348 if (container && container->draw_transform().GetInverse(&containerTargetSurf aceSpaceToContainerLayerSpace)) | |
349 targetSurfaceSpaceToContainerLayerSpace.ConcatTransform(containerTargetS urfaceSpaceToContainerLayerSpace); | |
350 | |
351 // Apply step 3 | |
352 gfx::Transform containerLayerSpaceTotargetSurfaceSpace; | |
353 if (targetSurfaceSpaceToContainerLayerSpace.GetInverse(&containerLayerSpaceT otargetSurfaceSpace)) | |
354 resultTransform.PreconcatTransform(containerLayerSpaceTotargetSurfaceSpa ce); | |
355 else { | |
356 // FIXME: A non-invertible matrix could still make meaningful projection . | |
357 // For example ScaleZ(0) is non-invertible but the layer is still visibl e. | |
358 return gfx::Transform(); | |
359 } | |
360 | |
361 // Apply step 2 | |
362 resultTransform.Translate(positionOffset.x(), positionOffset.y()); | |
363 | |
364 // Apply step 1 | |
365 resultTransform.PreconcatTransform(targetSurfaceSpaceToContainerLayerSpace); | |
366 | |
367 return resultTransform; | |
368 } | |
369 | |
370 | |
371 void applyPositionAdjustment(Layer*, Layer*, const gfx::Transform&, gfx::Transfo rm*) { } | |
372 void applyPositionAdjustment(LayerImpl* layer, LayerImpl* container, const gfx:: Transform& scrollCompensation, gfx::Transform* combinedTransform) | |
373 { | |
374 if (!layer->position_constraint().is_fixed_position()) | |
375 return; | |
376 | |
377 // Special case: this layer is a composited fixed-position layer; we need to | |
378 // explicitly compensate for all ancestors' nonzero scrollDeltas to keep thi s layer | |
379 // fixed correctly. | |
380 // Note carefully: this is Concat, not Preconcat (currentScrollCompensation * combinedTransform). | |
381 combinedTransform->ConcatTransform(scrollCompensation); | |
382 | |
383 // For right-edge or bottom-edge anchored fixed position layers, | |
384 // the layer should relocate itself if the container changes its size. | |
385 bool fixedToRightEdge = layer->position_constraint().is_fixed_to_right_edge( ); | |
386 bool fixedToBottomEdge = layer->position_constraint().is_fixed_to_bottom_edg e(); | |
387 gfx::Vector2dF positionOffset = container ? container->fixed_container_size_ delta() : gfx::Vector2dF(); | |
388 positionOffset.set_x(fixedToRightEdge ? positionOffset.x() : 0); | |
389 positionOffset.set_y(fixedToBottomEdge ? positionOffset.y() : 0); | |
390 if (positionOffset.IsZero()) | |
391 return; | |
392 | |
393 combinedTransform->ConcatTransform(computeTranslateInContainerLayerSpace(lay er, container, positionOffset)); | |
394 } | |
395 | |
319 gfx::Transform computeScrollCompensationForThisLayer(LayerImpl* scrollingLayer, const gfx::Transform& parentMatrix) | 396 gfx::Transform computeScrollCompensationForThisLayer(LayerImpl* scrollingLayer, const gfx::Transform& parentMatrix) |
320 { | 397 { |
321 // For every layer that has non-zero scrollDelta, we have to compute a trans form that can undo the | 398 // For every layer that has non-zero scrollDelta, we have to compute a trans form that can undo the |
322 // scrollDelta translation. In particular, we want this matrix to premultipl y a fixed-position layer's | 399 // scrollDelta translation. In particular, we want this matrix to premultipl y a fixed-position layer's |
323 // parentMatrix, so we design this transform in three steps as follows. The steps described here apply | 400 // parentMatrix, so we design this transform in three steps as follows. The steps described here apply |
324 // from right-to-left, so Step 1 would be the right-most matrix: | 401 // from right-to-left, so Step 1 would be the right-most matrix: |
325 // | 402 // |
326 // Step 1. transform from target surface space to the exact space where scrollDelta is actually applied. | 403 // Step 1. transform from target surface space to the exact space where scrollDelta is actually applied. |
327 // -- this is inverse of the matrix in step 3 | 404 // -- this is inverse of the matrix in step 3 |
328 // Step 2. undo the scrollDelta | 405 // Step 2. undo the scrollDelta |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
546 static void roundTranslationComponents(gfx::Transform* transform) | 623 static void roundTranslationComponents(gfx::Transform* transform) |
547 { | 624 { |
548 transform->matrix().setDouble(0, 3, MathUtil::Round(transform->matrix().getD ouble(0, 3))); | 625 transform->matrix().setDouble(0, 3, MathUtil::Round(transform->matrix().getD ouble(0, 3))); |
549 transform->matrix().setDouble(1, 3, MathUtil::Round(transform->matrix().getD ouble(1, 3))); | 626 transform->matrix().setDouble(1, 3, MathUtil::Round(transform->matrix().getD ouble(1, 3))); |
550 } | 627 } |
551 | 628 |
552 // Recursively walks the layer tree starting at the given node and computes all the | 629 // Recursively walks the layer tree starting at the given node and computes all the |
553 // necessary transformations, clipRects, render surfaces, etc. | 630 // necessary transformations, clipRects, render surfaces, etc. |
554 template<typename LayerType, typename LayerList, typename RenderSurfaceType> | 631 template<typename LayerType, typename LayerList, typename RenderSurfaceType> |
555 static void calculateDrawPropertiesInternal(LayerType* layer, const gfx::Transfo rm& parentMatrix, | 632 static void calculateDrawPropertiesInternal(LayerType* layer, const gfx::Transfo rm& parentMatrix, |
556 const gfx::Transform& fullHierarchyMatrix, const gfx::Transform& currentScro llCompensationMatrix, | 633 const gfx::Transform& fullHierarchyMatrix, const gfx::Transform& currentScro llCompensationMatrix, LayerType* currentFixedContainer, |
557 const gfx::Rect& clipRectFromAncestor, const gfx::Rect& clipRectFromAncestor InDescendantSpace, bool ancestorClipsSubtree, | 634 const gfx::Rect& clipRectFromAncestor, const gfx::Rect& clipRectFromAncestor InDescendantSpace, bool ancestorClipsSubtree, |
558 RenderSurfaceType* nearestAncestorThatMovesPixels, LayerList& renderSurfaceL ayerList, LayerList& layerList, | 635 RenderSurfaceType* nearestAncestorThatMovesPixels, LayerList& renderSurfaceL ayerList, LayerList& layerList, |
559 LayerSorter* layerSorter, int maxTextureSize, float deviceScaleFactor, float pageScaleFactor, bool subtreeCanUseLCDText, | 636 LayerSorter* layerSorter, int maxTextureSize, float deviceScaleFactor, float pageScaleFactor, bool subtreeCanUseLCDText, |
560 gfx::Rect& drawableContentRectOfSubtree, bool updateTilePriorities) | 637 gfx::Rect& drawableContentRectOfSubtree, bool updateTilePriorities) |
561 { | 638 { |
562 // This function computes the new matrix transformations recursively for thi s | 639 // This function computes the new matrix transformations recursively for thi s |
563 // layer and all its descendants. It also computes the appropriate render su rfaces. | 640 // layer and all its descendants. It also computes the appropriate render su rfaces. |
564 // Some important points to remember: | 641 // Some important points to remember: |
565 // | 642 // |
566 // 0. Here, transforms are notated in Matrix x Vector order, and in words we describe what | 643 // 0. Here, transforms are notated in Matrix x Vector order, and in words we describe what |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
702 // computation of contentsScale above. | 779 // computation of contentsScale above. |
703 // Note carefully: this is Concat, not Preconcat (implTransform * combinedTr ansform). | 780 // Note carefully: this is Concat, not Preconcat (implTransform * combinedTr ansform). |
704 combinedTransform.ConcatTransform(layer->impl_transform()); | 781 combinedTransform.ConcatTransform(layer->impl_transform()); |
705 | 782 |
706 if (!animatingTransformToTarget && layer->scrollable() && combinedTransform. IsScaleOrTranslation()) { | 783 if (!animatingTransformToTarget && layer->scrollable() && combinedTransform. IsScaleOrTranslation()) { |
707 // Align the scrollable layer's position to screen space pixels to avoid blurriness. | 784 // Align the scrollable layer's position to screen space pixels to avoid blurriness. |
708 // To avoid side-effects, do this only if the transform is simple. | 785 // To avoid side-effects, do this only if the transform is simple. |
709 roundTranslationComponents(&combinedTransform); | 786 roundTranslationComponents(&combinedTransform); |
710 } | 787 } |
711 | 788 |
712 if (layer->fixed_to_container_layer()) { | 789 // Apply adjustment from position constraints. |
713 // Special case: this layer is a composited fixed-position layer; we nee d to | 790 applyPositionAdjustment(layer, currentFixedContainer, currentScrollCompensat ionMatrix, &combinedTransform); |
714 // explicitly compensate for all ancestors' nonzero scrollDeltas to keep this layer | |
715 // fixed correctly. | |
716 // Note carefully: this is Concat, not Preconcat (currentScrollCompensat ion * combinedTransform). | |
717 combinedTransform.ConcatTransform(currentScrollCompensationMatrix); | |
718 } | |
719 | 791 |
720 // The drawTransform that gets computed below is effectively the layer's dra wTransform, unless | 792 // The drawTransform that gets computed below is effectively the layer's dra wTransform, unless |
721 // the layer itself creates a renderSurface. In that case, the renderSurface re-parents the transforms. | 793 // the layer itself creates a renderSurface. In that case, the renderSurface re-parents the transforms. |
722 layerDrawProperties.target_space_transform = combinedTransform; | 794 layerDrawProperties.target_space_transform = combinedTransform; |
723 // M[draw] = M[parent] * LT * S[layer2content] | 795 // M[draw] = M[parent] * LT * S[layer2content] |
724 layerDrawProperties.target_space_transform.Scale(1.0 / layer->contents_scale _x(), 1.0 / layer->contents_scale_y()); | 796 layerDrawProperties.target_space_transform.Scale(1.0 / layer->contents_scale _x(), 1.0 / layer->contents_scale_y()); |
725 | 797 |
726 // layerScreenSpaceTransform represents the transform between root layer's " screen space" and local content space. | 798 // layerScreenSpaceTransform represents the transform between root layer's " screen space" and local content space. |
727 layerDrawProperties.screen_space_transform = fullHierarchyMatrix; | 799 layerDrawProperties.screen_space_transform = fullHierarchyMatrix; |
728 if (!layer->preserves_3d()) | 800 if (!layer->preserves_3d()) |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
891 | 963 |
892 LayerList& descendants = (layer->render_surface() ? layer->render_surface()- >layer_list() : layerList); | 964 LayerList& descendants = (layer->render_surface() ? layer->render_surface()- >layer_list() : layerList); |
893 | 965 |
894 // Any layers that are appended after this point are in the layer's subtree and should be included in the sorting process. | 966 // Any layers that are appended after this point are in the layer's subtree and should be included in the sorting process. |
895 unsigned sortingStartIndex = descendants.size(); | 967 unsigned sortingStartIndex = descendants.size(); |
896 | 968 |
897 if (!layerShouldBeSkipped(layer)) | 969 if (!layerShouldBeSkipped(layer)) |
898 descendants.push_back(layer); | 970 descendants.push_back(layer); |
899 | 971 |
900 gfx::Transform nextScrollCompensationMatrix = computeScrollCompensationMatri xForChildren(layer, parentMatrix, currentScrollCompensationMatrix);; | 972 gfx::Transform nextScrollCompensationMatrix = computeScrollCompensationMatri xForChildren(layer, parentMatrix, currentScrollCompensationMatrix);; |
973 LayerType* nextFixedContainer = layer->is_container_for_fixed_position_layer s() ? layer : currentFixedContainer; | |
901 | 974 |
902 gfx::Rect accumulatedDrawableContentRectOfChildren; | 975 gfx::Rect accumulatedDrawableContentRectOfChildren; |
903 for (size_t i = 0; i < layer->children().size(); ++i) { | 976 for (size_t i = 0; i < layer->children().size(); ++i) { |
904 LayerType* child = LayerTreeHostCommon::getChildAsRawPtr(layer->children (), i); | 977 LayerType* child = LayerTreeHostCommon::getChildAsRawPtr(layer->children (), i); |
905 gfx::Rect drawableContentRectOfChildSubtree; | 978 gfx::Rect drawableContentRectOfChildSubtree; |
906 calculateDrawPropertiesInternal<LayerType, LayerList, RenderSurfaceType> (child, sublayerMatrix, nextHierarchyMatrix, nextScrollCompensationMatrix, | 979 calculateDrawPropertiesInternal<LayerType, LayerList, RenderSurfaceType> (child, sublayerMatrix, nextHierarchyMatrix, nextScrollCompensationMatrix, nextF ixedContainer, |
907 clipRectForSubtree, clipRectForSubtreeInDescendantSpace, subtreeShouldBeClipped , nearestAncestorThatMovesPixels, | 980 clipRectForSubtree, clipRectForSubtreeInDescendantSpace, subtreeShouldBeClipped , nearestAncestorThatMovesPixels, |
908 renderSurfaceLayerList, descendants, layerSorter, maxTextureSize, deviceScaleFa ctor, pageScaleFactor, | 981 renderSurfaceLayerList, descendants, layerSorter, maxTextureSize, deviceScaleFa ctor, pageScaleFactor, |
909 subtreeCanUseLCDText, drawableContentRectOfChildSubtree, updateTilePriorities); | 982 subtreeCanUseLCDText, drawableContentRectOfChildSubtree, updateTilePriorities); |
910 if (!drawableContentRectOfChildSubtree.IsEmpty()) { | 983 if (!drawableContentRectOfChildSubtree.IsEmpty()) { |
911 accumulatedDrawableContentRectOfChildren.Union(drawableContentRectOf ChildSubtree); | 984 accumulatedDrawableContentRectOfChildren.Union(drawableContentRectOf ChildSubtree); |
912 if (child->render_surface()) | 985 if (child->render_surface()) |
913 descendants.push_back(child); | 986 descendants.push_back(child); |
914 } | 987 } |
915 } | 988 } |
916 | 989 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1039 // The root layer's renderSurface should receive the deviceViewport as the i nitial clipRect. | 1112 // The root layer's renderSurface should receive the deviceViewport as the i nitial clipRect. |
1040 bool subtreeShouldBeClipped = true; | 1113 bool subtreeShouldBeClipped = true; |
1041 gfx::Rect deviceViewportRect(gfx::Point(), deviceViewportSize); | 1114 gfx::Rect deviceViewportRect(gfx::Point(), deviceViewportSize); |
1042 bool updateTilePriorities = false; | 1115 bool updateTilePriorities = false; |
1043 | 1116 |
1044 // This function should have received a root layer. | 1117 // This function should have received a root layer. |
1045 DCHECK(isRootLayer(rootLayer)); | 1118 DCHECK(isRootLayer(rootLayer)); |
1046 | 1119 |
1047 preCalculateMetaInformation<Layer>(rootLayer); | 1120 preCalculateMetaInformation<Layer>(rootLayer); |
1048 calculateDrawPropertiesInternal<Layer, std::vector<scoped_refptr<Layer> >, R enderSurface>( | 1121 calculateDrawPropertiesInternal<Layer, std::vector<scoped_refptr<Layer> >, R enderSurface>( |
1049 rootLayer, deviceScaleTransform, identityMatrix, identityMatrix, | 1122 rootLayer, deviceScaleTransform, identityMatrix, identityMatrix, 0, |
1050 deviceViewportRect, deviceViewportRect, subtreeShouldBeClipped, 0, rende rSurfaceLayerList, | 1123 deviceViewportRect, deviceViewportRect, subtreeShouldBeClipped, 0, rende rSurfaceLayerList, |
1051 dummyLayerList, 0, maxTextureSize, | 1124 dummyLayerList, 0, maxTextureSize, |
1052 deviceScaleFactor, pageScaleFactor, canUseLCDText, totalDrawableContentR ect, | 1125 deviceScaleFactor, pageScaleFactor, canUseLCDText, totalDrawableContentR ect, |
1053 updateTilePriorities); | 1126 updateTilePriorities); |
1054 | 1127 |
1055 // The dummy layer list should not have been used. | 1128 // The dummy layer list should not have been used. |
1056 DCHECK(dummyLayerList.size() == 0); | 1129 DCHECK(dummyLayerList.size() == 0); |
1057 // A root layer renderSurface should always exist after calculateDrawPropert ies. | 1130 // A root layer renderSurface should always exist after calculateDrawPropert ies. |
1058 DCHECK(rootLayer->render_surface()); | 1131 DCHECK(rootLayer->render_surface()); |
1059 } | 1132 } |
1060 | 1133 |
1061 void LayerTreeHostCommon::calculateDrawProperties(LayerImpl* rootLayer, const gf x::Size& deviceViewportSize, float deviceScaleFactor, float pageScaleFactor, int maxTextureSize, bool canUseLCDText, std::vector<LayerImpl*>& renderSurfaceLayer List, bool updateTilePriorities) | 1134 void LayerTreeHostCommon::calculateDrawProperties(LayerImpl* rootLayer, const gf x::Size& deviceViewportSize, float deviceScaleFactor, float pageScaleFactor, int maxTextureSize, bool canUseLCDText, std::vector<LayerImpl*>& renderSurfaceLayer List, bool updateTilePriorities) |
1062 { | 1135 { |
1063 gfx::Rect totalDrawableContentRect; | 1136 gfx::Rect totalDrawableContentRect; |
1064 gfx::Transform identityMatrix; | 1137 gfx::Transform identityMatrix; |
1065 gfx::Transform deviceScaleTransform; | 1138 gfx::Transform deviceScaleTransform; |
1066 deviceScaleTransform.Scale(deviceScaleFactor, deviceScaleFactor); | 1139 deviceScaleTransform.Scale(deviceScaleFactor, deviceScaleFactor); |
1067 std::vector<LayerImpl*> dummyLayerList; | 1140 std::vector<LayerImpl*> dummyLayerList; |
1068 LayerSorter layerSorter; | 1141 LayerSorter layerSorter; |
1069 | 1142 |
1070 // The root layer's renderSurface should receive the deviceViewport as the i nitial clipRect. | 1143 // The root layer's renderSurface should receive the deviceViewport as the i nitial clipRect. |
1071 bool subtreeShouldBeClipped = true; | 1144 bool subtreeShouldBeClipped = true; |
1072 gfx::Rect deviceViewportRect(gfx::Point(), deviceViewportSize); | 1145 gfx::Rect deviceViewportRect(gfx::Point(), deviceViewportSize); |
1073 | 1146 |
1074 // This function should have received a root layer. | 1147 // This function should have received a root layer. |
1075 DCHECK(isRootLayer(rootLayer)); | 1148 DCHECK(isRootLayer(rootLayer)); |
1076 | 1149 |
1077 preCalculateMetaInformation<LayerImpl>(rootLayer); | 1150 preCalculateMetaInformation<LayerImpl>(rootLayer); |
1078 calculateDrawPropertiesInternal<LayerImpl, std::vector<LayerImpl*>, RenderSu rfaceImpl>( | 1151 calculateDrawPropertiesInternal<LayerImpl, std::vector<LayerImpl*>, RenderSu rfaceImpl>( |
1079 rootLayer, deviceScaleTransform, identityMatrix, identityMatrix, | 1152 rootLayer, deviceScaleTransform, identityMatrix, identityMatrix, 0, |
1080 deviceViewportRect, deviceViewportRect, subtreeShouldBeClipped, 0, rende rSurfaceLayerList, | 1153 deviceViewportRect, deviceViewportRect, subtreeShouldBeClipped, 0, rende rSurfaceLayerList, |
1081 dummyLayerList, &layerSorter, maxTextureSize, | 1154 dummyLayerList, &layerSorter, maxTextureSize, |
1082 deviceScaleFactor, pageScaleFactor, canUseLCDText, totalDrawableContentR ect, | 1155 deviceScaleFactor, pageScaleFactor, canUseLCDText, totalDrawableContentR ect, |
1083 updateTilePriorities); | 1156 updateTilePriorities); |
1084 | 1157 |
1085 // The dummy layer list should not have been used. | 1158 // The dummy layer list should not have been used. |
1086 DCHECK(dummyLayerList.size() == 0); | 1159 DCHECK(dummyLayerList.size() == 0); |
1087 // A root layer renderSurface should always exist after calculateDrawPropert ies. | 1160 // A root layer renderSurface should always exist after calculateDrawPropert ies. |
1088 DCHECK(rootLayer->render_surface()); | 1161 DCHECK(rootLayer->render_surface()); |
1089 } | 1162 } |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1217 | 1290 |
1218 // At this point, we think the point does hit the touch event handler region o n the layer, but we need to walk up | 1291 // At this point, we think the point does hit the touch event handler region o n the layer, but we need to walk up |
1219 // the parents to ensure that the layer was not clipped in such a way that the | 1292 // the parents to ensure that the layer was not clipped in such a way that the |
1220 // hit point actually should not hit the layer. | 1293 // hit point actually should not hit the layer. |
1221 if (pointIsClippedBySurfaceOrClipRect(screenSpacePoint, layerImpl)) | 1294 if (pointIsClippedBySurfaceOrClipRect(screenSpacePoint, layerImpl)) |
1222 return false; | 1295 return false; |
1223 | 1296 |
1224 return true; | 1297 return true; |
1225 } | 1298 } |
1226 } // namespace cc | 1299 } // namespace cc |
OLD | NEW |