зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1450307 - Round scaled paint size instead of paint bounds in GenerateFallbackData. r=jrmuizel
A component of dtSize could be zero because RoundedToInt(rect).Size() is not the same as RoundedToInt(rect.Size()). The size after rounding might be zero, even if the rounded size is not zero. For example with x0=0.5, x1=1.1. MozReview-Commit-ID: 3NeBMAVD5ub --HG-- extra : rebase_source : a241b10aa6e1e788691cfb7ac412fe5073257c81 extra : amend_source : 8d55d933c021b77463eb6c4fe0a2503fc9bf78d7
This commit is contained in:
Родитель
f01bca68ca
Коммит
0ba1c0fc98
|
@ -1609,9 +1609,9 @@ WebRenderCommandBuilder::GenerateFallbackData(nsDisplayItem* aItem,
|
|||
|
||||
// Some display item may draw exceed the paintSize, we need prepare a larger
|
||||
// draw target to contain the result.
|
||||
auto scaledBounds = bounds * LayoutDeviceToLayerScale(1);
|
||||
scaledBounds.Scale(scale.width, scale.height);
|
||||
LayerIntSize dtSize = RoundedToInt(scaledBounds).Size();
|
||||
auto scaledPaintSize = bounds.Size() * LayoutDeviceToLayerScale(1);
|
||||
scaledPaintSize.Scale(scale.width, scale.height);
|
||||
LayerIntSize dtSize = RoundedToInt(scaledPaintSize);
|
||||
|
||||
bool needPaint = true;
|
||||
LayoutDeviceIntPoint offset = RoundedToInt(bounds.TopLeft());
|
||||
|
|
Загрузка…
Ссылка в новой задаче