mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1058884 - Update drawing of borders to account for multi-layer-apz. r=kats,BenWa
--HG-- extra : rebase_source : e7ebb3ac4f7e30ce28e49fb27034a6322ea8a085
This commit is contained in:
parent
d1451fb2a2
commit
13ee5dfe65
@ -313,13 +313,30 @@ RenderLayers(ContainerT* aContainer,
|
|||||||
layerToRender->SetShadowVisibleRegion(preparedData.mSavedVisibleRegion);
|
layerToRender->SetShadowVisibleRegion(preparedData.mSavedVisibleRegion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Layer* layer = layerToRender->GetLayer();
|
||||||
if (gfxPrefs::UniformityInfo()) {
|
if (gfxPrefs::UniformityInfo()) {
|
||||||
PrintUniformityInfo(layerToRender->GetLayer());
|
PrintUniformityInfo(layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gfxPrefs::DrawLayerInfo()) {
|
if (gfxPrefs::DrawLayerInfo()) {
|
||||||
DrawLayerInfo(clipRect, aManager, layerToRender->GetLayer());
|
DrawLayerInfo(clipRect, aManager, layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Draw a border around scrollable layers.
|
||||||
|
for (uint32_t i = 0; i < layer->GetFrameMetricsCount(); i++) {
|
||||||
|
// A layer can be scrolled by multiple scroll frames. Draw a border
|
||||||
|
// for each.
|
||||||
|
if (layer->GetFrameMetrics(i).IsScrollable()) {
|
||||||
|
// Since the composition bounds are in the parent layer's coordinates,
|
||||||
|
// use the parent's effective transform rather than the layer's own.
|
||||||
|
ParentLayerRect compositionBounds = layer->GetFrameMetrics(i).mCompositionBounds;
|
||||||
|
aManager->GetCompositor()->DrawDiagnostics(DiagnosticFlags::CONTAINER,
|
||||||
|
compositionBounds.ToUnknownRect(),
|
||||||
|
gfx::Rect(aClipRect.ToUnknownRect()),
|
||||||
|
aContainer->GetEffectiveTransform());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// invariant: our GL context should be current here, I don't think we can
|
// invariant: our GL context should be current here, I don't think we can
|
||||||
// assert it though
|
// assert it though
|
||||||
}
|
}
|
||||||
@ -433,19 +450,6 @@ ContainerRender(ContainerT* aContainer,
|
|||||||
RenderLayers(aContainer, aManager, RenderTargetPixel::FromUntyped(aClipRect));
|
RenderLayers(aContainer, aManager, RenderTargetPixel::FromUntyped(aClipRect));
|
||||||
}
|
}
|
||||||
aContainer->mPrepared = nullptr;
|
aContainer->mPrepared = nullptr;
|
||||||
|
|
||||||
for (uint32_t i = 0; i < aContainer->GetFrameMetricsCount(); i++) {
|
|
||||||
if (!aContainer->GetFrameMetrics(i).IsScrollable()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
const FrameMetrics& frame = aContainer->GetFrameMetrics(i);
|
|
||||||
LayerRect layerBounds = frame.mCompositionBounds * ParentLayerToLayerScale(1.0);
|
|
||||||
gfx::Rect rect(layerBounds.x, layerBounds.y, layerBounds.width, layerBounds.height);
|
|
||||||
gfx::Rect clipRect(aClipRect.x, aClipRect.y, aClipRect.width, aClipRect.height);
|
|
||||||
aManager->GetCompositor()->DrawDiagnostics(DiagnosticFlags::CONTAINER,
|
|
||||||
rect, clipRect,
|
|
||||||
aContainer->GetEffectiveTransform());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ContainerLayerComposite::ContainerLayerComposite(LayerManagerComposite *aManager)
|
ContainerLayerComposite::ContainerLayerComposite(LayerManagerComposite *aManager)
|
||||||
|
Loading…
Reference in New Issue
Block a user