зеркало из https://github.com/mozilla/gecko-dev.git
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
This commit is contained in:
Родитель
1e782edab3
Коммит
0da057c54f
|
@ -1343,7 +1343,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);
|
||||
|
@ -1432,7 +1434,7 @@ DrawTargetD2D1::GetDeviceSpaceClipRect(D2D1_RECT_F& aClipRect, bool& aIsPixelAli
|
|||
}
|
||||
|
||||
already_AddRefed<ID2D1Image>
|
||||
DrawTargetD2D1::GetImageForLayerContent()
|
||||
DrawTargetD2D1::GetImageForLayerContent(bool aShouldPreserveContent)
|
||||
{
|
||||
if (!CurrentLayer().mCurrentList) {
|
||||
RefPtr<ID2D1Bitmap> tmpBitmap;
|
||||
|
@ -1469,9 +1471,11 @@ DrawTargetD2D1::GetImageForLayerContent()
|
|||
}
|
||||
|
||||
DCCommandSink sink(mDC);
|
||||
list->Stream(&sink);
|
||||
|
||||
PushAllClips();
|
||||
if (aShouldPreserveContent) {
|
||||
list->Stream(&sink);
|
||||
PushAllClips();
|
||||
}
|
||||
|
||||
if (mDidComplexBlendWithListInList) {
|
||||
return tmpBitmap.forget();
|
||||
|
|
|
@ -186,7 +186,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()
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче