| Index: third_party/WebKit/Source/platform/graphics/compositing/PaintChunksToCcLayer.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintChunksToCcLayer.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintChunksToCcLayer.cpp
|
| index 8b0b073dfec70136b0f217834cff77da387a2a33..cca3328f15e5b547dcbfdca3b5dc1734896adcd2 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/compositing/PaintChunksToCcLayer.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintChunksToCcLayer.cpp
|
| @@ -25,19 +25,19 @@
|
|
|
| // Applies the clips between |localState| and |ancestorState| into a single
|
| // combined cc::FloatClipDisplayItem on |ccList|.
|
| -static void applyClipsBetweenStates(
|
| - const PropertyTreeState& localState,
|
| - const PropertyTreeState& ancestorState,
|
| - cc::DisplayItemList& ccList,
|
| - Vector<EndDisplayItemType>& endDisplayItems) {
|
| +static void applyClipsBetweenStates(const PropertyTreeState& localState,
|
| + const PropertyTreeState& ancestorState,
|
| + cc::DisplayItemList& ccList,
|
| + Vector<EndDisplayItemType>& endDisplayItems,
|
| + GeometryMapper& geometryMapper) {
|
| DCHECK(localState.transform() == ancestorState.transform());
|
| #if DCHECK_IS_ON()
|
| const TransformPaintPropertyNode* transformNode =
|
| localState.clip()->localTransformSpace();
|
| if (transformNode != ancestorState.transform()) {
|
| const TransformationMatrix& localToAncestorMatrix =
|
| - GeometryMapper::localToAncestorMatrix(transformNode,
|
| - ancestorState.transform());
|
| + geometryMapper.localToAncestorMatrix(transformNode,
|
| + ancestorState.transform());
|
| // Clips are only in descendant spaces that are transformed by one
|
| // or more scrolls.
|
| DCHECK(localToAncestorMatrix.isIdentityOrTranslation());
|
| @@ -45,7 +45,7 @@
|
| #endif
|
|
|
| const FloatClipRect& combinedClip =
|
| - GeometryMapper::localToAncestorClipRect(localState, ancestorState);
|
| + geometryMapper.localToAncestorClipRect(localState, ancestorState);
|
|
|
| ccList.CreateAndAppendPairedBeginItem<cc::FloatClipDisplayItem>(
|
| gfx::RectF(combinedClip.rect()));
|
| @@ -56,7 +56,8 @@
|
| const Vector<PropertyTreeState>& pairedStates,
|
| const PropertyTreeState& pendingLayerState,
|
| cc::DisplayItemList& ccList,
|
| - Vector<EndDisplayItemType>& endDisplayItems) {
|
| + Vector<EndDisplayItemType>& endDisplayItems,
|
| + GeometryMapper& geometryMapper) {
|
| PropertyTreeState mappedClipDestinationSpace = pendingLayerState;
|
| PropertyTreeState clipSpace = pendingLayerState;
|
| bool hasClip = false;
|
| @@ -68,7 +69,7 @@
|
| case PropertyTreeState::Transform: {
|
| if (hasClip) {
|
| applyClipsBetweenStates(clipSpace, mappedClipDestinationSpace, ccList,
|
| - endDisplayItems);
|
| + endDisplayItems, geometryMapper);
|
| hasClip = false;
|
| }
|
| mappedClipDestinationSpace = *pairedState;
|
| @@ -117,8 +118,8 @@
|
| const TransformPaintPropertyNode* transformNode =
|
| pairedState->effect()->localTransformSpace();
|
| const TransformationMatrix& localToAncestorMatrix =
|
| - GeometryMapper::localToAncestorMatrix(transformNode,
|
| - pairedState->transform());
|
| + geometryMapper.localToAncestorMatrix(transformNode,
|
| + pairedState->transform());
|
| // Effects are only in descendant spaces that are transformed by one
|
| // or more scrolls.
|
| DCHECK(localToAncestorMatrix.isIdentityOrTranslation());
|
| @@ -152,7 +153,7 @@
|
|
|
| if (hasClip) {
|
| applyClipsBetweenStates(clipSpace, mappedClipDestinationSpace, ccList,
|
| - endDisplayItems);
|
| + endDisplayItems, geometryMapper);
|
| }
|
| }
|
|
|
| @@ -205,7 +206,8 @@
|
| const Vector<const PaintChunk*>& paintChunks,
|
| const PropertyTreeState& layerState,
|
| const gfx::Vector2dF& layerOffset,
|
| - const DisplayItemList& displayItems) {
|
| + const DisplayItemList& displayItems,
|
| + GeometryMapper& geometryMapper) {
|
| auto ccList = make_scoped_refptr(new cc::DisplayItemList);
|
|
|
| gfx::Transform counterOffset;
|
| @@ -228,7 +230,7 @@
|
| Vector<EndDisplayItemType> endDisplayItems;
|
|
|
| recordPairedBeginDisplayItems(pairedStates, layerState, *ccList.get(),
|
| - endDisplayItems);
|
| + endDisplayItems, geometryMapper);
|
|
|
| for (const auto& displayItem : displayItems.itemsInPaintChunk(*paintChunk))
|
| appendDisplayItemToCcDisplayItemList(displayItem, ccList.get());
|
|
|