| 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 | 5 |
| 6 #include "config.h" | 6 #include "config.h" |
| 7 | 7 |
| 8 #include "CCLayerTreeHostCommon.h" | 8 #include "CCLayerTreeHostCommon.h" |
| 9 | 9 |
| 10 #include "CCLayerImpl.h" | 10 #include "CCLayerImpl.h" |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 // Any layers that are appended after this point are in the layer's subtree
and should be included in the sorting process. | 628 // Any layers that are appended after this point are in the layer's subtree
and should be included in the sorting process. |
| 629 unsigned sortingStartIndex = descendants.size(); | 629 unsigned sortingStartIndex = descendants.size(); |
| 630 | 630 |
| 631 if (!layerShouldBeSkipped(layer)) | 631 if (!layerShouldBeSkipped(layer)) |
| 632 descendants.append(layer); | 632 descendants.append(layer); |
| 633 | 633 |
| 634 WebTransformationMatrix nextScrollCompensationMatrix = computeScrollCompensa
tionMatrixForChildren(layer, parentMatrix, currentScrollCompensationMatrix);; | 634 WebTransformationMatrix nextScrollCompensationMatrix = computeScrollCompensa
tionMatrixForChildren(layer, parentMatrix, currentScrollCompensationMatrix);; |
| 635 | 635 |
| 636 IntRect accumulatedDrawableContentRectOfChildren; | 636 IntRect accumulatedDrawableContentRectOfChildren; |
| 637 for (size_t i = 0; i < layer->children().size(); ++i) { | 637 for (size_t i = 0; i < layer->children().size(); ++i) { |
| 638 LayerType* child = layer->children()[i].get(); | 638 LayerType* child = CCLayerTreeHostCommon::getChildAsRawPtr(layer->childr
en(), i); |
| 639 IntRect drawableContentRectOfChildSubtree; | 639 IntRect drawableContentRectOfChildSubtree; |
| 640 calculateDrawTransformsInternal<LayerType, LayerList, RenderSurfaceType,
LayerSorter>(child, rootLayer, sublayerMatrix, nextHierarchyMatrix, nextScrollC
ompensationMatrix, | 640 calculateDrawTransformsInternal<LayerType, LayerList, RenderSurfaceType,
LayerSorter>(child, rootLayer, sublayerMatrix, nextHierarchyMatrix, nextScrollC
ompensationMatrix, |
| 641
clipRectForSubtree, subtreeShouldBeClipped, nearestAncestorThatMov
esPixels, | 641
clipRectForSubtree, subtreeShouldBeClipped, nearestAncestorThatMov
esPixels, |
| 642
renderSurfaceLayerList, descendants, layerSorter, maxTextureSize,
deviceScaleFactor, drawableContentRectOfChildSubtree); | 642
renderSurfaceLayerList, descendants, layerSorter, maxTextureSize,
deviceScaleFactor, drawableContentRectOfChildSubtree); |
| 643 if (!drawableContentRectOfChildSubtree.isEmpty()) { | 643 if (!drawableContentRectOfChildSubtree.isEmpty()) { |
| 644 accumulatedDrawableContentRectOfChildren.unite(drawableContentRectOf
ChildSubtree); | 644 accumulatedDrawableContentRectOfChildren.unite(drawableContentRectOf
ChildSubtree); |
| 645 if (child->renderSurface()) | 645 if (child->renderSurface()) |
| 646 descendants.append(child); | 646 descendants.append(child); |
| 647 } | 647 } |
| 648 } | 648 } |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 876 | 876 |
| 877 foundLayer = currentLayer; | 877 foundLayer = currentLayer; |
| 878 break; | 878 break; |
| 879 } | 879 } |
| 880 | 880 |
| 881 // This can potentially return 0, which means the viewportPoint did not succ
essfully hit test any layers, not even the root layer. | 881 // This can potentially return 0, which means the viewportPoint did not succ
essfully hit test any layers, not even the root layer. |
| 882 return foundLayer; | 882 return foundLayer; |
| 883 } | 883 } |
| 884 | 884 |
| 885 } // namespace cc | 885 } // namespace cc |
| OLD | NEW |