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

Unified Diff: Source/core/rendering/RenderLayerCompositor.cpp

Issue 143283011: Make squashing work with subpixel layout (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/RenderLayerCompositor.cpp
diff --git a/Source/core/rendering/RenderLayerCompositor.cpp b/Source/core/rendering/RenderLayerCompositor.cpp
index 0f7daf4090606791c18d46cc295d95f4976d5924..d1fdf5f02611d6b63142615de341196a1cbd2e29 100644
--- a/Source/core/rendering/RenderLayerCompositor.cpp
+++ b/Source/core/rendering/RenderLayerCompositor.cpp
@@ -1043,7 +1043,7 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* ancestor
overlapMap->geometryMap().popMappingsToAncestor(ancestorLayer);
}
-void RenderLayerCompositor::SquashingState::updateSquashingStateForNewMapping(CompositedLayerMappingPtr newCompositedLayerMapping, bool hasNewCompositedLayerMapping, IntPoint newOffsetFromAbsoluteForSquashingCLM)
+void RenderLayerCompositor::SquashingState::updateSquashingStateForNewMapping(CompositedLayerMappingPtr newCompositedLayerMapping, bool hasNewCompositedLayerMapping, LayoutPoint newOffsetFromAbsoluteForSquashingCLM)
{
// The most recent backing is done accumulating any more squashing layers.
if (hasMostRecentMapping)
@@ -1055,12 +1055,12 @@ void RenderLayerCompositor::SquashingState::updateSquashingStateForNewMapping(Co
offsetFromAbsoluteForSquashingCLM = newOffsetFromAbsoluteForSquashingCLM;
}
-static IntPoint computeOffsetFromAbsolute(RenderLayer* layer)
+static LayoutPoint computeOffsetFromAbsolute(RenderLayer* layer)
{
TransformState transformState(TransformState::ApplyTransformDirection, FloatPoint());
layer->renderer()->mapLocalToContainer(0, transformState, ApplyContainerFlip);
transformState.flatten();
- return roundedIntPoint(transformState.lastPlanarPoint());
+ return roundedLayoutPoint(transformState.lastPlanarPoint());
}
void RenderLayerCompositor::assignLayersToBackings(RenderLayer* updateRoot, bool& layersChanged)
@@ -1090,9 +1090,9 @@ void RenderLayerCompositor::assignLayersToBackingsInternal(RenderLayer* layer, S
ASSERT(!layer->hasCompositedLayerMapping());
ASSERT(squashingState.hasMostRecentMapping);
- IntPoint offsetFromAbsoluteForSquashedLayer = computeOffsetFromAbsolute(layer);
+ LayoutPoint offsetFromAbsoluteForSquashedLayer = computeOffsetFromAbsolute(layer);
- IntSize offsetFromSquashingCLM(offsetFromAbsoluteForSquashedLayer.x() - squashingState.offsetFromAbsoluteForSquashingCLM.x(),
+ LayoutSize offsetFromSquashingCLM(offsetFromAbsoluteForSquashedLayer.x() - squashingState.offsetFromAbsoluteForSquashingCLM.x(),
offsetFromAbsoluteForSquashedLayer.y() - squashingState.offsetFromAbsoluteForSquashingCLM.y());
squashingState.mostRecentMapping->addRenderLayerToSquashingGraphicsLayer(layer, offsetFromSquashingCLM, squashingState.nextSquashedLayerIndex);
@@ -1138,7 +1138,7 @@ void RenderLayerCompositor::assignLayersToBackingsInternal(RenderLayer* layer, S
// At this point, if the layer is to be "separately" composited, then its backing becomes the most recent in paint-order.
if (layer->compositingState() == PaintsIntoOwnBacking || layer->compositingState() == HasOwnBackingButPaintsIntoAncestor) {
ASSERT(!requiresSquashing(layer->compositingReasons()));
- IntPoint offsetFromAbsoluteForSquashingCLM = computeOffsetFromAbsolute(layer);
+ LayoutPoint offsetFromAbsoluteForSquashingCLM = computeOffsetFromAbsolute(layer);
squashingState.updateSquashingStateForNewMapping(layer->compositedLayerMapping(), layer->hasCompositedLayerMapping(), offsetFromAbsoluteForSquashingCLM);
}
}

Powered by Google App Engine
This is Rietveld 408576698