Bug 945655 - Don't add transparency around the filter output before sending it to DrawSurface. r=roc

This commit is contained in:
Markus Stange 2013-12-10 14:50:40 +01:00
parent 80876b8581
commit e6512a0aae

View File

@ -582,25 +582,17 @@ FilterNodeSoftware::Draw(DrawTarget* aDrawTarget,
return; return;
} }
// Add transparency around outputRect in renderIntRect.
result = GetDataSurfaceInRect(result, outputRect, renderIntRect, EDGE_MODE_NONE);
if (!result) {
#ifdef DEBUG_DUMP_SURFACES
printf("GetDataSurfaceInRect for output returned null\n");
printf("</pre>\n");
#endif
return;
}
#ifdef DEBUG_DUMP_SURFACES #ifdef DEBUG_DUMP_SURFACES
printf("output:\n"); printf("output:\n");
printf("<img src='"); DumpAsPNG(result); printf("'>\n"); printf("<img src='"); DumpAsPNG(result); printf("'>\n");
printf("</pre>\n"); printf("</pre>\n");
#endif #endif
// Draw. Point sourceToDestOffset = aDestPoint - aSourceRect.TopLeft();
aDrawTarget->DrawSurface(result, Rect(aDestPoint, aSourceRect.Size()), Rect renderedSourceRect = Rect(outputRect).Intersect(aSourceRect);
aSourceRect - renderIntRect.TopLeft(), Rect renderedDestRect = renderedSourceRect + sourceToDestOffset;
aDrawTarget->DrawSurface(result, renderedDestRect,
renderedSourceRect - Point(outputRect.TopLeft()),
DrawSurfaceOptions(), aOptions); DrawSurfaceOptions(), aOptions);
} }