mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1300338: Do not attempt to preserve layer content when we're going to override it in a blend operation anyway. r=jrmuizel
MozReview-Commit-ID: DIEyrK89jtd --HG-- extra : rebase_source : 0201b307ccc25f7d9ec40dd426effdaca586bb3b
This commit is contained in:
parent
7af9a3ed9e
commit
4e18ab329e
@ -1318,7 +1318,9 @@ DrawTargetD2D1::FinalizeDrawing(CompositionOp aOp, const Pattern &aPattern)
|
||||
return;
|
||||
}
|
||||
|
||||
RefPtr<ID2D1Image> tmpImage = GetImageForLayerContent();
|
||||
// We don't need to preserve the current content of this layer as the output
|
||||
// of the blend effect should completely replace it.
|
||||
RefPtr<ID2D1Image> tmpImage = GetImageForLayerContent(false);
|
||||
|
||||
blendEffect->SetInput(0, tmpImage);
|
||||
blendEffect->SetInput(1, source);
|
||||
@ -1407,7 +1409,7 @@ DrawTargetD2D1::GetDeviceSpaceClipRect(D2D1_RECT_F& aClipRect, bool& aIsPixelAli
|
||||
}
|
||||
|
||||
already_AddRefed<ID2D1Image>
|
||||
DrawTargetD2D1::GetImageForLayerContent()
|
||||
DrawTargetD2D1::GetImageForLayerContent(bool aShouldPreserveContent)
|
||||
{
|
||||
if (!CurrentLayer().mCurrentList) {
|
||||
RefPtr<ID2D1Bitmap> tmpBitmap;
|
||||
@ -1444,7 +1446,10 @@ DrawTargetD2D1::GetImageForLayerContent()
|
||||
}
|
||||
|
||||
DCCommandSink sink(mDC);
|
||||
list->Stream(&sink);
|
||||
|
||||
if (aShouldPreserveContent) {
|
||||
list->Stream(&sink);
|
||||
}
|
||||
|
||||
PushAllClips();
|
||||
|
||||
|
@ -184,7 +184,7 @@ private:
|
||||
void AddDependencyOnSource(SourceSurfaceD2D1* aSource);
|
||||
|
||||
// Must be called with all clips popped and an identity matrix set.
|
||||
already_AddRefed<ID2D1Image> GetImageForLayerContent();
|
||||
already_AddRefed<ID2D1Image> GetImageForLayerContent(bool aShouldPreserveContent = true);
|
||||
|
||||
ID2D1Image* CurrentTarget()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user