mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 725925 - ShadowableThebesLayer does useless extra composite into 1x1 fake surface. r=cjones
This commit is contained in:
parent
de905e6af5
commit
0feadfea5c
@ -763,7 +763,9 @@ BasicThebesLayer::PaintThebes(gfxContext* aContext,
|
||||
if (BasicManager()->IsTransactionIncomplete())
|
||||
return;
|
||||
|
||||
if (!IsHidden()) {
|
||||
gfxRect clipExtents;
|
||||
clipExtents = aContext->GetClipExtents();
|
||||
if (!IsHidden() && !clipExtents.IsEmpty()) {
|
||||
AutoSetOperator setOperator(aContext, GetOperator());
|
||||
mBuffer.DrawTo(this, aContext, opacity);
|
||||
}
|
||||
@ -1946,16 +1948,22 @@ BasicLayerManager::PaintLayer(gfxContext* aTarget,
|
||||
NS_ABORT_IF_FALSE(untransformedSurface,
|
||||
"We should always allocate an untransformed surface with 3d transforms!");
|
||||
|
||||
gfxPoint offset;
|
||||
bool dontBlit = needsClipToVisibleRegion || mTransactionIncomplete ||
|
||||
aLayer->GetEffectiveOpacity() != 1.0f;
|
||||
nsRefPtr<gfxASurface> result =
|
||||
Transform3D(untransformedSurface, aTarget, bounds,
|
||||
effectiveTransform, offset, dontBlit);
|
||||
// Temporary fast fix for bug 725886
|
||||
// Revert these changes when 725886 is ready
|
||||
gfxRect clipExtents;
|
||||
clipExtents = aTarget->GetClipExtents();
|
||||
if (!clipExtents.IsEmpty()) {
|
||||
gfxPoint offset;
|
||||
bool dontBlit = needsClipToVisibleRegion || mTransactionIncomplete ||
|
||||
aLayer->GetEffectiveOpacity() != 1.0f;
|
||||
nsRefPtr<gfxASurface> result =
|
||||
Transform3D(untransformedSurface, aTarget, bounds,
|
||||
effectiveTransform, offset, dontBlit);
|
||||
|
||||
blitComplete = !result;
|
||||
if (result) {
|
||||
aTarget->SetSource(result, offset);
|
||||
blitComplete = !result;
|
||||
if (result) {
|
||||
aTarget->SetSource(result, offset);
|
||||
}
|
||||
}
|
||||
}
|
||||
// If we're doing our own double-buffering, we need to avoid drawing
|
||||
|
@ -530,6 +530,8 @@ PuppetWidget::DispatchPaintEvent()
|
||||
DispatchEvent(&event, status);
|
||||
} else {
|
||||
nsRefPtr<gfxContext> ctx = new gfxContext(mSurface);
|
||||
ctx->Rectangle(gfxRect(0,0,0,0));
|
||||
ctx->Clip();
|
||||
AutoLayerManagerSetup setupLayerManager(this, ctx,
|
||||
BasicLayerManager::BUFFER_NONE);
|
||||
DispatchEvent(&event, status);
|
||||
|
Loading…
Reference in New Issue
Block a user