зеркало из https://github.com/mozilla/pjs.git
Bug 757380 - Check clip before creating group target. r=Bas
This commit is contained in:
Родитель
d1e9a97fc8
Коммит
7cae773939
|
@ -1976,7 +1976,8 @@ BasicLayerManager::PaintLayer(gfxContext* aTarget,
|
||||||
|
|
||||||
nsRefPtr<gfxContext> groupTarget;
|
nsRefPtr<gfxContext> groupTarget;
|
||||||
nsRefPtr<gfxASurface> untransformedSurface;
|
nsRefPtr<gfxASurface> untransformedSurface;
|
||||||
if (!is2D) {
|
bool clipIsEmpty = aTarget->GetClipExtents().IsEmpty();
|
||||||
|
if (!is2D && !clipIsEmpty) {
|
||||||
untransformedSurface =
|
untransformedSurface =
|
||||||
gfxPlatform::GetPlatform()->CreateOffscreenSurface(gfxIntSize(bounds.width, bounds.height),
|
gfxPlatform::GetPlatform()->CreateOffscreenSurface(gfxIntSize(bounds.width, bounds.height),
|
||||||
gfxASurface::CONTENT_COLOR_ALPHA);
|
gfxASurface::CONTENT_COLOR_ALPHA);
|
||||||
|
@ -1994,7 +1995,7 @@ BasicLayerManager::PaintLayer(gfxContext* aTarget,
|
||||||
}
|
}
|
||||||
untransformedSurface->SetDeviceOffset(gfxPoint(-bounds.x, -bounds.y));
|
untransformedSurface->SetDeviceOffset(gfxPoint(-bounds.x, -bounds.y));
|
||||||
groupTarget = new gfxContext(untransformedSurface);
|
groupTarget = new gfxContext(untransformedSurface);
|
||||||
} else if (needsGroup) {
|
} else if (needsGroup && !clipIsEmpty) {
|
||||||
groupTarget = PushGroupForLayer(aTarget, aLayer, aLayer->GetEffectiveVisibleRegion(),
|
groupTarget = PushGroupForLayer(aTarget, aLayer, aLayer->GetEffectiveVisibleRegion(),
|
||||||
&needsClipToVisibleRegion);
|
&needsClipToVisibleRegion);
|
||||||
} else {
|
} else {
|
||||||
|
@ -2051,9 +2052,7 @@ BasicLayerManager::PaintLayer(gfxContext* aTarget,
|
||||||
|
|
||||||
// Temporary fast fix for bug 725886
|
// Temporary fast fix for bug 725886
|
||||||
// Revert these changes when 725886 is ready
|
// Revert these changes when 725886 is ready
|
||||||
gfxRect clipExtents;
|
if (!clipIsEmpty) {
|
||||||
clipExtents = aTarget->GetClipExtents();
|
|
||||||
if (!clipExtents.IsEmpty()) {
|
|
||||||
gfxPoint offset;
|
gfxPoint offset;
|
||||||
bool dontBlit = needsClipToVisibleRegion || mTransactionIncomplete ||
|
bool dontBlit = needsClipToVisibleRegion || mTransactionIncomplete ||
|
||||||
aLayer->GetEffectiveOpacity() != 1.0f;
|
aLayer->GetEffectiveOpacity() != 1.0f;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче