зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1266380 - fix offset of untransformed surface when 3d transforming in BasicLayerManager. r=jrmuizel
This commit is contained in:
Родитель
81e6150f5c
Коммит
ad13359d88
|
@ -864,7 +864,7 @@ BasicLayerManager::PaintLayer(gfxContext* aTarget,
|
|||
|
||||
paintLayerContext.Apply2DTransform();
|
||||
|
||||
const nsIntRegion visibleRegion = aLayer->GetLocalVisibleRegion().ToUnknownRegion();
|
||||
nsIntRegion visibleRegion = aLayer->GetLocalVisibleRegion().ToUnknownRegion();
|
||||
// If needsGroup is true, we'll clip to the visible region after we've popped the group
|
||||
if (needsClipToVisibleRegion && !needsGroup) {
|
||||
gfxUtils::ClipToRegion(aTarget, visibleRegion);
|
||||
|
@ -897,7 +897,7 @@ BasicLayerManager::PaintLayer(gfxContext* aTarget,
|
|||
return;
|
||||
}
|
||||
|
||||
const IntRect& bounds = visibleRegion.GetBounds();
|
||||
IntRect bounds = visibleRegion.GetBounds();
|
||||
RefPtr<DrawTarget> untransformedDT =
|
||||
gfxPlatform::GetPlatform()->CreateOffscreenContentDrawTarget(IntSize(bounds.width, bounds.height),
|
||||
SurfaceFormat::B8G8R8A8);
|
||||
|
@ -934,6 +934,7 @@ BasicLayerManager::PaintLayer(gfxContext* aTarget,
|
|||
ToRect(aTarget->GetClipExtents()));
|
||||
xformBounds.RoundOut();
|
||||
effectiveTransform.PostTranslate(-xformBounds.x, -xformBounds.y, 0);
|
||||
effectiveTransform.PreTranslate(bounds.x, bounds.y, 0);
|
||||
|
||||
RefPtr<SourceSurface> untransformedSurf = untransformedDT->Snapshot();
|
||||
RefPtr<DrawTarget> xformDT =
|
||||
|
|
Загрузка…
Ссылка в новой задаче