mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1062886 - Fix one color padded drawing path, r=seth
This commit is contained in:
parent
a8597eb2e3
commit
e33a216517
@ -446,13 +446,14 @@ imgFrame::SurfaceForDrawing(bool aDoPadding,
|
||||
|
||||
// Fill 'available' with whatever we've got
|
||||
if (mSinglePixel) {
|
||||
target->FillRect(ToRect(aRegion.Rect()), ColorPattern(mSinglePixelColor),
|
||||
target->FillRect(ToRect(aRegion.Intersect(available).Rect()),
|
||||
ColorPattern(mSinglePixelColor),
|
||||
DrawOptions(1.0f, CompositionOp::OP_SOURCE));
|
||||
} else {
|
||||
SurfacePattern pattern(aSurface,
|
||||
ExtendMode::REPEAT,
|
||||
ToMatrix(aContext->CurrentMatrix()));
|
||||
target->FillRect(ToRect(aRegion.Rect()), pattern);
|
||||
target->FillRect(ToRect(aRegion.Intersect(available).Rect()), pattern);
|
||||
}
|
||||
|
||||
RefPtr<SourceSurface> newsurf = target->Snapshot();
|
||||
@ -503,7 +504,7 @@ bool imgFrame::Draw(gfxContext* aContext, const ImageRegion& aRegion,
|
||||
mSize.height + aPadding.TopBottom());
|
||||
|
||||
RefPtr<SourceSurface> surf = GetSurface();
|
||||
if (!surf) {
|
||||
if (!surf && !mSinglePixel) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
BIN
image/test/reftest/gif/one-color-offset-ref.gif
Normal file
BIN
image/test/reftest/gif/one-color-offset-ref.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 69 B |
BIN
image/test/reftest/gif/one-color-offset.gif
Normal file
BIN
image/test/reftest/gif/one-color-offset.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 49 B |
@ -19,6 +19,9 @@ random == delaytest.html?transparent-animation.gif transparent-animation-finalfr
|
||||
# test for bug 641198
|
||||
skip-if(B2G) random-if(Android) == test_bug641198.html animation2a-finalframe.gif # bug 773482
|
||||
|
||||
# Bug 1062886: a gif with a single color and an offset
|
||||
== one-color-offset.gif one-color-offset-ref.gif
|
||||
|
||||
# webcam-simulacrum.mgif is a hand-edited file containing red.gif and blue.gif,
|
||||
# concatenated together with the relevant headers for
|
||||
# multipart/x-mixed-replace. Specifically, with the headers in
|
||||
|
Loading…
Reference in New Issue
Block a user